Q. Given that Student is a class, how many reference variables and objects are created by the following code?
Code:
Student studentName, studentId;
studentName = new Student();
Student stud_class = new Student();
β
Correct Answer: (B)
Three reference variables and two objects are created.