import java.util.Scanner;

class Student{

    String name;
    int age;
    String no;
    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }
    public String getNo(){
        return no;
    }
    Student(String name1,int age1,String no1){
        name=name1;
        age=age1;
        no=no1;
    }


}

public class Main{
    public static void main(String[] args){
        Scanner sca = new Scanner(System.in);
        Student stu = new Student(sca.next(),sca.nextInt(),sca.next());
        System.out.println("Name:"+stu.getName()+" Age:"+stu.getAge()+" No:"+stu.getNo());
    }

}
0
Posted in Java

Leave a Comment:

电子邮件地址不会被公开。