Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class justMessinRound {
- public static void main(String args[]) {
- Scanner input = new Scanner(System.in);
- System.out.println("enter your user id");
- String theirUsername = input.next();
- System.out.println("enter your password");
- String theirPassword = input.next();
- String theUsername = "williamlangdoc";
- String thePassoword = "102703";
- if (theirUsername.equals(theUsername) && theirPassword.equals(thePassoword)) {
- System.out.println("Welcome");
- } else {
- if (theirPassword.equals(thePassoword)) {
- System.out.println("incorrect username");
- }
- else
- {
- if (theirUsername.equals(theUsername))
- {
- System.out.println("incorrect password");
- }
- else
- {
- System.out.println("error");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement