Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to delete an element from two dimensional String array

843785Feb 8 2009 — edited Feb 9 2009
Hi

Could you give some suggestions on how to delete an element from two dimensional string array.

Sample Code:
     public void addElements(){          
          columnData = new String[4][3];          
          columnData[0][0] = "William";
          columnData[0][1] = "A";
          columnData[0][2] = "Wilson";
          for(int i=1;i<4;i++){
               columnData[0] = "William";
columnData[i][1] = String.valueOf(i*13);
Calendar c = new GregorianCalendar();
columnData[i][2] = ((Date)c.getTime()).toString();
}

}
     
I will compare columnData[1] with some string and when it matches, I have to remove column[i] from the two dimensional array.

Any suggestions.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2009
Added on Feb 8 2009
5 comments
1,617 views