Blogger

Delete comment from: Javarevisited

Aakash Verma said...

If you execute those 4 lines of declaration in 6th example per se, it would definitely be a runtime error. To really induce dynamic binding as you want to with different wrapper types, you should actually go for "Objects[] items[]=new Objects[][];" and not "new String[][]".

Jun 11, 2016, 11:23:37 AM


Posted to 6 ways to declare and initialize a two-dimensional (2D) String and Integer Array in Java - Example Tutorial

Google apps
Main menu