WHAT'S NEW?

Simple Class to Create a Multi Dimensional Array

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]); 

}
}



0 comments:

Post a Comment