Java Language | 10 Minute‐Test 11


Instruction

  • Total number of questions : 10.
  • Time alloted : 10 minutes.
  • Each question carry 1 mark.
  • No Negative marks
  • DO NOT refresh the page.
  • All the best :-).

1.

Which of these keywords is used to make a class?

A.
class
B.
struct
C.
int
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

2.

What is the process of defining more than one method in a class differentiated by method signature?

A.
Function overriding
B.
Function overloading
C.
Function doubling
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

Function overloading is a process of defining more than one method in a class with same name differentiated by function signature i:e return type or parameters type and number. Example – int volume(int length, int width) & int volume(int length , int width , int height) can be used to calculate volume.

3.

Which keyword is used by method to refer to the object that invoked it?

A.
import
B.
catch
C.
abstract
D.
this

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

this keyword can be used inside any method to refer to the current object. this is always a reference to the object on which the method was invoked.

4.

Which of these can be overloaded?

A.
Methods
B.
Constructors
C.
All of the mentioned
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

None.

5.

Which of these is used to access member of class before object of that class is created?

A.
public
B.
private
C.
static
D.
protected

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

None.

6.

Which of these keywords is used to prevent content of a variable from being modified?

A.
final
B.
last
C.
constant
D.
static

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

A variable can be declared final, doing so prevents its content from being modified. Final variables must be initialized when it is declared.

7.

Which of these method of String class is used to obtain character at specified index?

A.
char()
B.
Charat()
C.
charat()
D.
charAt()

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

None.

8.

Which of these keywords is used to refer to member of base class from a sub class?

A.
upper
B.
super
C.
this
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

whenever a subclass needs to refer to its immediate superclass, it can do so by use of the keyword super.

9.

What is the process of defining a method in subclass having same name & type signature as a method in its superclass?

A.
Method overloading
B.
Method overriding
C.
Method hiding
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

None.

10.

Which of these method of Object class can clone an object?

A.
Objectcopy()
B.
copy()
C.
Object clone()
D.
clone()
Submit your test now to view the Results and Statistics with answer explanation.