0

Doubt on my this question listed under arrays

Question, String array[][] ={{"Hi","I","am"}{"learning","java"}} My doubt is can one have "array[][]". As in the previous lesson there explains type should initiate the array. So to my imagination I am guessing it should look like this String[][] array ={{"Hi","I","am"}{"learning","java"}}

13th May 2020, 10:40 PM
seelam suneel
seelam suneel - avatar
3 Respostas
+ 2
Both ways are correct, String [][] array used to be in older versions, and String array[][] is in latest version...although String [][] array can be considered more readable...
13th May 2020, 11:18 PM
Jay W
0
Thanks Jay for the explanation
13th May 2020, 11:20 PM
seelam suneel
seelam suneel - avatar
0
YW
14th May 2020, 12:04 AM
Jay W