I want to read from the keyboard the first name and last name of a member separated by space I have tried the following but it doesn't work.
public static void updateWeight()
{
Scanner in = new Scanner(System.in); // Creation of a new Scanner object
String tempName = ""; // Store temporary name collected by Scanner objecgt
String tempLastName = ""; // Store temporary last name collected by Scanner object
boolean found = false; // Boolean value in the case tha a member is found
int i = 0;
//Message to be displayed on the screen to input the values of tempName and tempLastName
System.out.println(" Give first name and last name separated with a (space) of the member you want to change the weight.");
String input = in.nextLine();
String delims = "[ }";
String tokens = input.split(delims);
tempName = in.next();
tempLastName = in.next();
incompatible types
String tokens = input.split(delims);
Thanks for any help.