You are on page 1of 1

CSE111

Quiz-2

14/6/2007

Name: _______________________________________________________
ID: ___________________________________________________________
Study the following output

Code
public class StudentTest{
public static void main(String [] args){
Student s1 = new Student();
System.out.println(s1.getName());
Student s2 = new Student("Matin");
System.out.println(s2.getName());
Student s3 = new Student("Saad");
System.out.println(s3.getName());
System.out.println(Student.numberOfStudents);
}
}

Output
default name
Matin
Saad
3

You might also like