Font size
WorksheetsJava-10 Interface
Total questions: 10
Worksheet time: 5mins
An interface _________ another interface
implements
joins
extends
implement
An interface extends a class
True
interface implements a class
Arithmetic Exception
Compiler Error
What will be the output?
Nothing
10
Compile time error
Runtime Exception
Inside an interface, every method is public and abstract.
TRUE
FALSE
All the methods inside an abstract class should be ___________
abstract
final
well defined
public
The interface methods can be made final.
TRUE
FALSE
What is the output?
Compiler Error
Happy Holi
Run time Exception
No error, No output
The scope of an interface method implemented in a class (overridden) must be
always private
always less than the scope of interface method
always more than the scope of interface method
always public
Object creation for Interface and abstract class..
Cannot be created for both
Can be created for Interface
Can be created for Abstract class
Can be created for both
We prefer using interface when __________, and an abstract class when ______________.
classes are not required, interfaces are not required
we don't know any implementation, we know partial implementations
we know every implementation, we know partial implementation
we work on Java, we work on C++; It depends on language
