Originally Posted by pradeep
We will use a multi-dimensional array.

Code: Java
String[][] Data;
 //Assign the values, do it either dynamically or statically
 //For first fow
 Data[0][0] = "S"; //lastname
 Data[0][1] = "Pradeep"; //firstname
 Data[0][2] = "Kolkata"; //location
 //Second row
 Data[1][0] = "Bhimani"; //lastname
  Data[1][1] = "Shabbir"; //firstname
  Data[1][2] = "Kolkata"; //location
 //Add as many rows you want
   //move to new line

This should do the work for you.
How do we test if the array is null not testing for a null element?