2d character array to string (java) -
i need converting 2d character array string. figured out how convert 1d character array string, i'm unsure how go changing display 2d char array.
public class chararraytostring { public static void main(string[] args) { char[] chararrays = new char[] {'0', '4', '2', 'b', 'p', 'r'}; string newstring1 = new string(chararrays); system.out.println("newstring1 : " + newstring1); string newstring2; newstring2 = string.valueof(chararrays); system.out.println("newstring2 : " + newstring2); } }
Comments
Post a Comment