0

programming languages Online Quiz - 340

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

In a method call when an object reference is passed as an argument , So what gets passed actually ?

  1. The object itself

  2. a copy of reference

  3. the original reference

  4. a reference to a copy


Correct Option: B

A constructor can be declared abstract

  1. True

  2. False


Correct Option: B

The legal values for a boolean in java are choose all that applies

  1. 1,0

  2. TRUE,FALSE

  3. true , false , TRUE,FALSE

  4. true , false


Correct Option: D

Its possible for a non-abstract class to have abstract methods.

  1. True

  2. False


Correct Option: B

The following statement would allocate memory on? char *ptr = malloc(10);

  1. Stack

  2. Heap

  3. Code Segment

  4. Data Segment


Correct Option: B

In the following segments which is the read only segment?

  1. Heap

  2. Stack

  3. Code Segment

  4. Data Segment


Correct Option: C

Can a constructor be declared as private?

  1. True

  2. False


Correct Option: A
  1. Compilation Error

  2. Arithmetic Exception

  3. Compiles with no errors

  4. None of the above


Correct Option: C

Consider the following case: A return statement is there in the catch block. An exception occurs and is caught. Now will the finally block be executed?

  1. will execute

  2. will not execute

  3. Compilation Error

  4. Runtime Exception


Correct Option: A
- Hide questions