Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Home / My courses /

UGRD-CS6203-2113T /
Object-Oriented Programming /
Prelim Lab Quiz 2

Started on Thursday, 4 November 2021, 9:27 PM


State Finished
Completed on Thursday, 4 November 2021, 9:29 PM
Time taken 2 mins 11 secs
Marks 20.00/20.00
Grade 100.00 out of 100.00

Question 1
Correct

Mark 2.00 out of 2.00

What method is used to find the nth no.


of character of given string s1. ?

a. s1.charAt

b. s1.index

c. s1.length()

d. s1.substring

Your answer is correct.

Question 2
Correct

Mark 2.00 out of 2.00

Re-implementing
an inherited method in a sub class to perform a different task from the parent
class is called - 

a. Hiding

b. extending 

c. Coupling

d. Binding

Your answer is correct.


Question 3
Correct

Mark 2.00 out of 2.00

  What keyword is used in Java to


define a constant?

a. final 

b. abstract

c. static

d. private

Your answer is correct.

Question 4
Correct

Mark 2.00 out of 2.00

Consider
the following statement(s) about Java:

I.    
All white-space characters (blanks) are ignored by the compiler.
II.    
Java keywords can be used as variable names.
III.   
An identifier does not begin with a digit and does not contain any spaces.

IV.  
The execution of Java applications begins at method main.
Which of them
is correct?

a. Both (II) and  (IV) above

b. Both (I) and (III) above

c. (III) and (IV) above


d. Both (I) and (II) above 

Your answer is correct.


Question 5
Correct

Mark 2.00 out of 2.00

Which one is true


about a constructor ?

a. All of the above


b. A constructor is used to create objects.

c. A constructor must have the same name as the


class it is declared within.

d. A constructor may be declared private

Your answer is correct.

Question 6
Correct

Mark 2.00 out of 2.00

If two methods have


same name but different parameter list then it is called what -

a. Operator overloading

b. Method
overloading

c. None of these

d. Method
overriding

Your answer is correct.


Question 7
Correct

Mark 2.00 out of 2.00

Which one is a
template for creating different objects ?

a. Method

b. Interface

c. A Class 

d. An Array

Your answer is correct.

Question 8
Correct

Mark 2.00 out of 2.00

In a
class definition, the special method provided to be called to create an
instance of that class is known as a/an -

a. Object

b. Constructor 

c. Interpreter

d. Destructor

Your answer is correct.


Question 9
Correct

Mark 2.00 out of 2.00

Which among the following best describes multiple inheritance?

a. Only one class being parent of other child classes

b. Only one class being parent of single child

c. More than one class being parent of other child classes

d. More than one class being parent of single child


Your answer is correct.

Question 10
Correct

Mark 2.00 out of 2.00

In Object Oriented Programming the mechanism of


deriving a new class from an old one is called - 

a. Inheritance

b. Method overloading

c. Operator overloading

d. Method overriding

Your answer is correct.

◄ Prelim Lab Quiz 1

Jump to...

Prelim Lab Exam ►

You might also like