My project is very similar to the famous ATM problem. I have to create a hotel check in/check out system. I have to get the user input for the last name and confirm it. However when I try to return the string, it tells me it cant convert string to int.
import java.util.Scanner;
public class Keyboard {
private Scanner input;
String lastName;
public Keyboard() {
input = new Scanner( System.in);
}
public int getInput() {
lastName = input.nextLine();
return lastName;
}
}