Refer to parent class object.
Refer to static method of the class.
Refer to current class object.
Refer to static variable of the class.
Rate this question:
Abstract
A simple class
Static class
None of the mentioned
Rate this question:
Public , static and final
Private, transient and abstract
Public , transient and abstract
Protected, final and static
Rate this question:
The keywords public and abstract can not be used together.
The method calculateSalaries() in class Company must have a body
You must add a return statement in method calculateSalaries().
Class Company must be defined abstract.
Rate this question:
Static
Constant
Protected
Final
Rate this question:
0
2
Runtime Error
Compile Time Error
Rate this question:
Only II
I and II
II and III
Only III
Rate this question:
Within the same class
Within the same packege
Anywhere
None of the above
Rate this question:
"2"
"2.0"
Compile time error
None of the mentioned
Rate this question:
0
2
4
None of the listed.
Rate this question:
Java.lang
Java.util
Java.io
Java.system
Rate this question:
2 2
3 3
Runtime error
Compilation error
Rate this question:
1,2 and 4
1 and 2 only
1,2 and 3
2,3 and 4
Rate this question:
1, 3 and 4
1, 2 and 4
2, 3 and 4
1, 2, 3 and 4
Rate this question:
InputStream
Reader
Writer
None of the mentioned
Rate this question:
Running
Runtime error
Running safely with 60km
Compile time erro
Rate this question:
Private final static int answer = 42
Public static int answer=42
Final static answer =42
Int answers
Rate this question:
String
StringReader
Writer
File
Rate this question:
Class name is not defined properly
Constructor is not defined.
Method is not defined properly
No error.
Rate this question:
All methods
All Variables
All Constructors
All of the above
Rate this question:
Public
Private
Protected
All of the above
Rate this question:
I am a Person
I am a Student
I am a Person I am a Student
I am a Student I am a Person
Rate this question:
Import, Package, Class
Import, Class, Package
Package, Import, Class
Random order
Rate this question:
This code will not compile, because method doYourJob() in interface Guard must be defined abstract.
This code will not compile, because class Dog must implement method doYourJob() from interface Guard.
This code will not compile, because in the declaration of class Dog we must use the keyword extends in stead of implements.
This code will compile without any errors.
Rate this question:
0
4
1
2
Rate this question:
This code will not compile, because method doYourJob() in interface Guard must be defined abstract.
This code will not compile, because class Dog must implement method doYourJob() from interface Guard.
This code will not compile, because in the declaration of class Dog we must use the keyword extends instead of implements.
This code will compile without any errors.
Rate this question:
Neigh
Animal is making a sound
Compilation Error
Runtime Error
Rate this question:
"is a ” relationship
“has a” relationship
“want to be” relationship
inheritance does not describe any kind of relationship between classes
Rate this question:
If we derive an abstract class and do not implement all the abstract methods, then the derived class should also be marked as abstract using 'abstract' keyword
Abstract classes can have constructors
A class can be made abstract without any abstract method
A class can inherit from multiple abstract classes
Rate this question:
Class B
Class B class C
Class A class B class C
None of the mentioned
Rate this question:
Compilation fails.
An exception is thrown at runtime.
"vehiclecar" is printed.
"vehiclebike" is printed.
Rate this question:
A = 10
A = 20
Compilation error
Runtime Error
Rate this question:
Compile time error no super class exists
Object
Compile successfully but no output
Runtime Error
Rate this question:
Method overloaded
Method duplicated
Method hiding
None of the mentioned
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.