String to Array Java

After learning how to convert a Java byte array and char array to string, let us see the other way of converting sting to array Java. The methods used for the job are toCharArray() and getBytes() method. Let us see first their signatures as defined in String class. public char[] toCharArray(): Returns a new char …

String to Array Java Read More »