Answer the question
In order to leave comments, you need to log in
Converting string to two dimensional array?
There is a line like 1233\n2345\n3467\n5677.
This string needs to be converted to String [4][4].direct to the true path......how to do it?
Answer the question
In order to leave comments, you need to log in
String str = "1233\n2345\n3467\n5677";
String[] arr= str.split("\n");
System.out.println(Arrays.toString(arr));
char[] charArray = str.toCharArray();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question