public static void main(String[] args)
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in);
String[] a = new String[]{br.readLine().split("\\s")};
}
I'm getting errors here. Is there any direct way to convert the line into array of strings?
.split()returns a String array, so it is not necessary to instantiate one yourself