Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pkg33333333;
- import java.util.Scanner;
- /**
- *
- * @author ais.amb
- */
- public class Pagr {
- Scanner input = new Scanner(System.in);
- public static void main(String[] args) {
- User user = new User();
- System.out.print("Name: " + user.Name + " Password: " + user.Password);
- }
- }
- public class User {
- String UserName;
- String Password;
- public User(){
- //Kuriant userį mes paprašom įvesti jo informaciją
- SetName();
- SetPassword();
- }
- public void SetName(){
- System.out.print("Iveskite savo prisijungimo varda: ");
- UserName = input.nextLine();
- }
- public void SetPassword(){
- System.out.print("Iveskite savo slaptazodi: ");
- Password = input.nextLine();
- }
- }
Add Comment
Please, Sign In to add comment