Solved

Consider the Following Code Snippet

Question 71

Multiple Choice

Consider the following code snippet:
Public class Student
{
Private static int lastAssignedStudentNum = 1500;
{ ) . . }
}
Which of the following statements about this code is correct?


A) Each object created from this class will have its own lastAssignedStudentNum variable.
B) All objects created from this class will share the lastAssignedStudentNum variable.
C) The lastAssignedStudentNum variable's value cannot be changed.
D) You cannot assign a value to a static variable.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions