public PasswordCheck() |
String time = input("Type the time as hh:mm"); |
public EmailCheck() { String email = input("eMail address"); int atSign = email.indexOf('@'); if(atSign < 0) { output("No @ sign"); } else { String name = email.substring(0,atSign); output("name = " + name); } int dot = email.indexOf('.'); if( dot < 0) { output(". dot is missing"); } else { String topDomain = email.substring(dot+1); output("Top level domain = " + topDomain); } if(dot > atSign && atSign >= 0) { String domain = email.substring(atSign+1,dot); output("Domain = " + domain); } } |
String time = input("Time as HH:MM"); // e.g. 10:35 |