Sorry that my title may be a little confusing. I am a little new to java and I am trying to write something so that when you run the code in eclipse, the console asks you for your email address, you input it and it changes email1 from:
String email1 = "";
To:
String email1 = "[email protected]";
Could someone tell me how to do this?
Here is my full code:
public class MainClass {
public MainClass() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String email1 = "testemail1";
String email2 = "testemail1";
boolean isMatch;
isMatch = email1.equals (email2);
if (isMatch == true){
System.out.println("Emails Match!");
} else{
System.out.println("Emails Dont Match");
}
}
}