When you say you want to get input from the command line, are you referring to the command line arguments, or input the program will read from the user while the program is running?
If it's the former, then the command line automatically divides up arguments based on quotation marks. So if I have this program:
Code:
public class test
{
public static void main(String[] args)
{
for(int i = 0; i < args.length; i++)
{
System.out.println(args[i]);
}
}
}
And then run
java test "hello dolly" "yoyo" "waawa"
Then the output will be
hello dolly
yoyo
waawa