Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
16 views1 page

0 - Javamcq Part1 20

The document contains a series of multiple-choice questions related to object-oriented programming concepts, specifically focusing on constructors, classes, and methods. Key answers include that an object of type Room can be created using 'rl = new Room();' and that a default constructor is called with empty parentheses. Additionally, it highlights that a variable like r2 contains a reference to the memory location of the new object.

Uploaded by

Priyansh Gangani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

0 - Javamcq Part1 20

The document contains a series of multiple-choice questions related to object-oriented programming concepts, specifically focusing on constructors, classes, and methods. Key answers include that an object of type Room can be created using 'rl = new Room();' and that a default constructor is called with empty parentheses. Additionally, it highlights that a variable like r2 contains a reference to the memory location of the new object.

Uploaded by

Priyansh Gangani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

b) Constructor

c) Class

d) Method

Ans: b

48-An object can be created of type Room and assign its address to variable rl as_______

a) rl = new Room();

b) rl = Room() new;

c) rl = Class Room();

d) None of these

Ans: a

49-With empty parentheses without arguments, a ______ Constructor is called.

a) parameterized

b) default

c) null

d) Method

Ans: B

50-Observe the following Room r2 = new RoomO : - Variable r2 contains a______or


address of memory location where a new object is created.

a) Memory

b) Variable

c) Reference

d) None of these

Ans: C

51-The class determines only the_______of the variables.

You might also like