Guest User

Untitled

a guest
Jul 3rd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SLAccount2Test {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner key = new Scanner(System.in);
  8. System.out.print("Username: ");
  9. String username = key.next();
  10. System.out.print("Password: ");
  11. String password = key.next();
  12. do {
  13. password = key.nextLine();
  14. } while (!SecondLifeAccount2.goodPassword(password));
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. System.out.print("Date of birth:\nMonth: ");
  22. int dob = key.nextInt();
  23.  
  24. System.out.print("Enter secret question: ");
  25. String secretQuestion = key.nextLine();
  26. System.out.print("Enter secret answer: ");
  27. String secretAnswer = key.nextLine();
  28.  
  29. SecondLifeAccount2 user1 = new SecondLifeAccount2(username, password,
  30. dob, secretQuestion, secretAnswer);
  31. SecondLifeAccount2 user = new SecondLifeAccount2();
  32. }
  33. }
Add Comment
Please, Sign In to add comment