import java.util.LinkedList;
import java.util.ListIterator;
import java.io.*;
public class llist {
public static void main(String[] args) {
String abc="poo";
String[][] array_string;
array_string= new String[10][10];
array_string[0][0]="123";
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
array_string[i][j]=(String)j;
System.out.print(array_string[i][j]);
System.out.println("");
}
}
}
}
error is:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Cannot cast from int to String
at llist.main(llist.java:14)
question is:
I want to display numbers in the string array(2D array)?