Advertisement
Guest User

Untitled

a guest
Feb 7th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Login {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7.  
  8. String username = scanner.nextLine();
  9. String passKey = scanner.nextLine();
  10.  
  11. String dota="ara";
  12.  
  13. StringBuilder password = new StringBuilder(username);
  14. password.reverse();
  15.  
  16.  
  17.  
  18. if (password .equals(dota) ){
  19. System.out.println("You LOGIN IN!"); System.out.printf("Password is %s",password);}
  20. else if (!password.equals(dota)){
  21. System.out.println("Invalid username");
  22. }
  23.  
  24. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement