package ex_class;
import java.io.PrintStream;
public class User {
static void Display(){
System.out.print("Фамилия: %s \tИмя: %s \tВозраст: %d\n ", firstName, lastName, year);
}
private String firstName;
private String lastName;
private int year;
public User(String firstName, String lastName, int year){
this.firstName = firstName;
this.lastName = lastName;
this.year = year;
}
public String getfirstName() {
return firstName;
}
public void setfirstName(String firstName) {
this.firstName = firstName;
}
public String getlastName() {
return lastName;
}
public void setlastName(String lastName) {
this.lastName = lastName;
}
public int getyear() {
return year;
}
public void setyear(int year) {
this.year = year;
}
public static void main(String[] args) {
User user = new User("Slavik", "Petrov", 20);
User.Display();
}
}