MC 307 Assignment-3
MC 307 Assignment-3
ASSIGNMENT-3
2023-24 SESSION
Q.1 Given the following code:
class Test class ok
{ { public static void main(String[ ]
int b; args)
} {
class Hello Hello h = new Hello();
{ }
int a; }
Test t;
}
The variables a, t, and h reside in which part of memory (Say memory is divided in two parts:
heap and stack)
Q.7. Consider the following statements regarding the “Object” class (the parent class of all
classes):
S1: Object Class is an Abstract class, hence, objects of “Object” class cannot be created.
S2: All the methods in Object class are declared as final, hence, all of them cannot be
overridden.
S3: Reference variables of Object class can be created if required.
Which of the above statements are correct ?