Doubt on my this question listed under arrays | SoloLearn: Learn to code for FREE!

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"}}

5/13/2020 10:40:56 PM

seelam suneel

3 Answers

New Answer

+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...

0

Thanks Jay for the explanation

0

YW