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

An odd human being who happens to have a variety of ever-changing interests, but right now they are programming, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert/drink flavors, obsessing about finding out how some things works, automation, anime, video games... Ran online dessert shops Cookies PH and Catzie's Cakery in her past life.

Leave a Reply

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