2 D Array is actually an Array holding reference of another Array.
Image Explanation is here :
![]() |
2 D Array - javawithz.in |
MultiDArray.java
class MultiDArray{
public static void main(String[] args)
{
String [] name[]={{"Mr","Mrs","Miss","Master"},
{"Tom","Marry","Mike","John"}};
System.out.println(name[0][1]+" "+name[1][1]);
System.out.println(name[0][3]+" "+name[1][3]);
System.out.println(name[0][2]+" "+name[1][1]);
}
}
Nice post
ReplyDeleteGood Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteJava Training in Electronic City