Android: 2-dimensional List String (List of List)

Written by

on

in

, ,

For a web developer who used mostly PHP and JavaScript for several years, plunging into Java can be challenging especially when it comes to data types.

PHP and JavaScript are loosely typed languages, while Java is strict about types.

I was told that in Android, List<String> is very commonly used, even more than arrays. And now I’ve come to the point when I need to use a 2-dimensional List<String>.

Here’s a sample code:

Output of System.outprintln(Arrays.deepToString(ls.toArray())); is this:

The output of Log.d("serialized", listOfList.toString()); is this:

Related Posts

About the author:

Catzie Avatar

The homo sapiens behind these blog posts is “Catzie“

Explore my top blog posts:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *