0

programming languages Online Quiz - 63

Description: programming languages Online Quiz - 63
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

What modifiers may be used with an interface declaration

  1. Public

  2. Private

  3. Abstract

  4. Protected


Correct Option: A,C
  1. Preconditions

  2. Postconditions

  3. Exceptions

  4. Class invariants


Correct Option: C

At first JAVA was named as______ .

  1. Fusion

  2. Gabriel

  3. Oak

  4. Globe


Correct Option: C

A lock can be acquired in a class.

  1. True

  2. False


Correct Option: A
  1. To provide access to the Java runtime system.

  2. To avoid run time exception.

  3. To provide the capability to execute code no matter whether or not an exception is thrown or caught.

  4. Both 2 & 3


Correct Option: A

Which containers may have a MenuBar?

  1. Panel

  2. Frame

  3. Class

  4. JVM


Correct Option: B

A class inherit the constructors of its superclass?

  1. True

  2. False


Correct Option: B

Which abstract class is the super class of all classes used for writing characters. Select the one correct answer.

  1. FileWriter

  2. CharWriter

  3. Writer

  4. OutputStream

  5. FileOutputStream


Correct Option: C
  1. all sub-classes of Throwable

  2. not the sub classes of RuntimeException

  3. all sub-classes of Error

  4. None of these


Correct Option: B

Which class is the immediate superclass of the Container class?

  1. Frame

  2. Component

  3. Public

  4. Super


Correct Option: B

public class Top { private int i; Top(int i) {this.i=i; } public int getValue(){ return this.i; } } class Bottom{ public static void main(String[] args) { Top tp = new Top(5); String j = Integer.toString(tr.getValue()); tp.i=15; System.out.println( tp.i + j); } }

  1. 155

  2. Compilation error

  3. Exception

  4. 20

  5. 5 5


Correct Option: B
- Hide questions