Skip to content
Advertisement

declare multiple arraylists

is it possible to declare 2 array lists in the same line? e.g:

JavaScript

Is it then possible to do something like:

JavaScript

Obviously, I get a compile error when I do the above, and was wondering how could one declare 2 lists in the same line.

Advertisement

Answer

If you want that, you should do:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement