Ok so a user types in an value for a variable named email in a signup process, then another method is called for them to sign in. When they sign in they have to use the same email they signed up with. Heres my code:
public static void signup() {
String email;
System.out.println("Please type in an email");
Scanner input = new Scanner(System.in);
email = input.nextLine();
signin();
}
public static void signin() {
String emailForSignin;
System.out.println("Please sign in with your email");
Scanner input = new Scanner(System.in);
emailForSignIn = input.nextLine();
if (emailForSignin != email) {
System.out.print("Thats not right, try again")
}
}
Now im not sure how to transfer the variable "email" to the signin method, can anybody tell me how to do that? Thanks
EDIT: Tried useing
public static void signin(String email) {
}
and got the error:
Error: The method signin(java.lang.String) in the type signup is not applicable for the arguments