import java.util.Scanner;
class G2Ex3 {
public static void main (String args[]) {
Scanner in = new Scanner (System.in);
System.out.print("Enter password: ");
String pw = in.nextLine();
switch (pw) {
case "JRU":
case "jru":
System.out.println("Password Accepted!");
break;
default:
System.out.println("Invalid Password!");
}
}
}
My code, as you can see has nothing to do with integers. My question is why does the program keeps telling me that it only founds java.lang.String and that it requires int? Thank you.