Java - Online Test - Interface - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Interface' - 12 questions found


Interface can only have ...Core Java
Member elements and Methods.
Static Variables and Static Methods.
Static Final Variables and Instance Method Declarations.
Member Elements , Instance Methods, Static variables and Static Methods.

  java  oops  interfaces

Variables of an interface are intrinsically ... Core Java
transient
final
public
static

  java  interface  interface variables

Which of the following doesn't extend Collection interface ?Core Java
Set
List
Map
Queue

  java  collections  collection interface

Which method needs to be implemented if a class is implementing comparable interface ?Core Java
comp
compare
compareTo
compareEquals

  comparable  interfaces  compare  compareTo

If X implements Y and Y extends Z, Which of the following initialization is correct ?Core Java
X x = new Y();
X x = new Z();
Z z = new Y();
Z z = new X();

  interfaces

If class A implements X interface, and Class B implements Y interface, and X is the parent of Y, Which of the following initialization is correct ?Core Java
A a = new B();
Y y = new A();
X x = new B();
Y y = new A();

  interfaces   inheritance

Which of the following is a Marker Interface ?Core Java
Runnable
Serializable
Cloneable
Both Serializable and Cloneable

  marker interface  interfaces

Which of following can be nested into another ?Core Java
class within another class
class within interface
interface within class
All of above

  nested classes   nested interface  inner classes

Which of following is not core interface of Hibernate ?Hibernate
Session
Transaction
SessionFactory
TransactionFactory

  Hibernate  hibernate Core Interface

enums are intrinsically ..Core Java
private
public
static
final

  java  enum

Enums cannot be declared ..Core Java
private
public
static
final

  java  enum

Collections is a / an ..Core Java
interface
abstract class
final class
util class

  collections







comments powered by Disqus