Guest User

Untitled

a guest
Oct 23rd, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3.  
  4. public class hello {
  5.  
  6. public static void main(String[] args) {
  7. Scanner sc = new Scanner(System.in);
  8.  
  9.  
  10.  
  11. Console cons = System.console();
  12.  
  13.  
  14.  
  15.  
  16. //  Console console = System.console();
  17. //         String password = new String(console.readPassword());
  18. //         System.out.println("password="+password);
  19.  
  20.  
  21. System.out.println("------歡迎使用-測試系統v0.1版------");
  22.  
  23. System.out.println("(1)登入"+'\n'+"(2)註冊"+'\n'+"(3)忘記密碼");
  24.  
  25.  
  26. int number = sc.nextInt();
  27. switch (number) {
  28.  
  29. case 1:
  30. System.out.print("帳號:");
  31. String username = sc.next();
  32. System.out.print("密碼:");
  33. String userpasswd = sc.next();
  34.  
  35. break;
  36. case 2:
  37. break;
  38.  
  39. }
  40.  
  41.  
  42. }
  43.  
  44. }
Add Comment
Please, Sign In to add comment