I have converted a String input into a character array by using toCharArray. Now I want to do the same thing without using toCharArray. How can I do it?
import java.util.*;
public class cArray{
public static void main(String[]args){
Scanner input = new Scanner(System.in);
System.out.println("Please Give A String");
String s1 = input.nextLine();
char[]data = s1.toCharArray();
}
}
toCharArrayand see how it's coded. And check the JLS to see the degree of standardisation to that an implementation must conform. You also learn to use a debugger and to follow a software spec: the most important skills of all.