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

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:

Posts that may be related to "Android: 2-dimensional List String (List of List)":

Catzie

A Filipino programmer with a variety of interests such as baking, singing, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert flavors, obsessing about finding out how some things works, board games, anime, video games, and forgetting things that usually go in her long list of interests. Running small-time online dessert shops Cookies PH and Catzie's Cakery.

Leave a Reply

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