Computer Applications

Consider the following code fragment assuming that a class namely Student has been defined earlier :

Student stud1;

What is above statement doing ?

Java Classes

12 Likes

Answer

The given statement declares a variable stud1 of type Student. It will be used to refer to a Student object. stud1 is a null reference.

Answered By

6 Likes


Related Questions