The String class has a method that will split that String into two Strings: x and y in an array.
Then you could use the Integer class to convert those two Strings into int values.
Type: Posts; User: Norm
The String class has a method that will split that String into two Strings: x and y in an array.
Then you could use the Integer class to convert those two Strings into int values.
They look like the names of methods.
I usually think of commands as the name of an executable program that you want the OS to execute.
Hence the term: command line
The first change you should make with your code is to remove all of the static modifiers but the one needed on the main method. You are giving poor advice with this code.
System.out.println("Enter the location (x, y) format: ");
double location = zip.nextDouble();
A double can only hold one value. For example: 1.23234. Not 3 and 4
Add a println("loc=" +...