339). What is not type of inheritance?

[A]Single inheritance
[B]Double inheritance
[C]Hierarchical inheritance
[D] Multiple inheritance

Show Answer

340). Using which of the following, multiple inheritance in Java can be implemented?

[A]Interfaces
[B]Multithreading
[C]Protected methods
[D]Private methods

Show Answer

341). All classes in Java are inherited from which class?

[A] java.lang.class
[B]java.class.inherited
[C]java.class.object
[D] java.lang.Object

Show Answer

342). In order to restrict a variable of a class from inheriting to subclass, how variable should be declared?

[A]Protected
[B]Private
[C]Public
[D]Static

Show Answer

343). If super class and subclass have same variable name, which keyword should be used to use super class?

[A]super
[B]this
[C]upper
[D]classname

Show Answer

345). Which of the following is used for implementing inheritance through an interface?

[A]inherited
[B]using
[C]extends
[D]implements

Show Answer

346). Which of the following is used for implementing inheritance through class?

[A]inherited
[B]using
[C]extends
[D]implements

Show Answer

347). What would be the result if a class extends two interfaces and both have a method with same name and signature? Lets assume that the class is not implementing that method.

[A]Runtime error
[B]Compile time error
[C]Code runs successfully
[D]First called method is executed successfully

Show Answer