Monday, 19 March 2012

Internet, Web Programming and Java MCQ 10


  1. Java provides an approach known as ________ as a convenient alternative to implement  multiple  inheritance:

    1. Inheritance
    2. Packages
    3. Interface
    4. None of these

  1. The syntax to define an interface is:

    1. Interface interface.name
    2. Interface interface-name
    3. interface interface_name
    4. none of these

  1. The interface is visible only to the members of the :

    1. Different package
    2. Main package
    3. Same package
    4. None of these

  1. The  interface accessible in any other code, it can be declared as:

    1. Public
    2. Private
    3. Both a & b
    4. None of these

  1. The variables in an interface are by default :

    1. Static
    2. Final
    3. Both a & b
    4. None of these

  1. The method compute() does not have a body part and its declaration ends with a:

    1. Colon
    2. Semicolon
    3. Dot
    4. None of these

  1. ________ can be used as a super class whose members and properties can be inherited by other classes.

    1. Inheritance
    2. Interface
    3. Packages
    4. None of these

  1. One or more classes can implement the interface by using the keyword_______ in the class definition:

    1. Extends
    2. implements
    3. interface
    4. none of these


  1. The methods in an interface are defined in the implementing class, the _______ keyword must be used:

    1. Public
    2. Private
    3. Protected
    4. All of these 

  1. If a class that implements the interface does not provide complete implementation of the methods declared in the interface, then it is necessary for the class to be declared as an:

    1. Abstract
    2. Interface
    3. Import
    4. None of these

  1. An interface can inherits another interface by using _______ keyword in the same way as a class inherits from another class:

    1. implements
    2. interface
    3. extends
    4. abstract

  1. The names of the super interfaces are separated by :

    1. ,
    2. .
    3. _
    4. ;

  1. _______ can also inherit from more than one interface:

    1. inheritance
    2. interface
    3. both a & b
    4. none of these

  1. _______ is a java application that helps in implementing multiple inheritance:

    1. inheritance
    2. interface
    3. packages
    4. constructors

  1. __________ refers to a construct that comprises several objects and forms the building blocks of java programs:

    1. interface
    2. inheritance
    3. object
    4. class

1 comment :

  1. Hi,Sometimes archived websites contain a lot of good content, but it’s not accessible through the archival interface in Web Design Cochin because the search function doesn’t work offline.Thanks.....................

    ReplyDelete