πŸ“Š JAVA
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();   
  • (A) Two reference variables and two objects are created.
  • (B) Three reference variables and two objects are created.
  • (C) One reference variable and two objects are created.
  • (D) Three reference variables and three objects are created.
πŸ’¬ Discuss
βœ… Correct Answer: (B) Three reference variables and two objects are created.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
361
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Vishal Gupta
Publisher
πŸ“ˆ
90%
Success Rate