Guest User

Untitled

a guest
Feb 8th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. package pkg33333333;
  2. import java.util.Scanner;
  3. /**
  4. *
  5. * @author ais.amb
  6. */
  7. public class Pagr {
  8.  
  9. Scanner input = new Scanner(System.in);
  10.  
  11. public static void main(String[] args) {
  12.  
  13. User user = new User();
  14.  
  15. System.out.print("Name: " + user.Name + " Password: " + user.Password);
  16. }
  17.  
  18. }
  19.  
  20.  
  21. public class User {
  22.  
  23. String UserName;
  24. String Password;
  25.  
  26.  
  27. public User(){
  28. //Kuriant userį mes paprašom įvesti jo informaciją
  29. SetName();
  30. SetPassword();
  31. }
  32.  
  33. public void SetName(){
  34. System.out.print("Iveskite savo prisijungimo varda: ");
  35. UserName = input.nextLine();
  36. }
  37.  
  38. public void SetPassword(){
  39. System.out.print("Iveskite savo slaptazodi: ");
  40. Password = input.nextLine();
  41. }
  42. }
Add Comment
Please, Sign In to add comment