0
Alien head

programming languages Online Quiz - 77

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

What is the difference between the types double and Double?

  1. double is primitive datatypes. Double is a class

  2. Both are primitive dataType

  3. Both are class type

  4. double is class and Double is primitive Type


Correct Option: A

Complexity Of Bubble Sort..???

  1. O(n)

  2. O(log n)

  3. O(n^2)

  4. O(n log n)


Correct Option: C

Complexity of Quick Sort????(avg)

  1. O(n2)

  2. O(log n)

  3. O(nlogn)

  4. O(n2 logn)


Correct Option: C

mainn() { main(); } This loop runs upto???

  1. Infinite loop

  2. Until Stack Underflow

  3. Until Machine Hangs

  4. Stack Overflow


Correct Option: D

A class cannot be declared

  1. volatile

  2. private

  3. default

  4. static


Correct Option: B

The methods wait(), notify() and notifyAll() in Object need to be called from synchronized pieces of code.

  1. true

  2. false

  3. Depends on situation

  4. none of the above


Correct Option: B

If class A implements an interface does it need to implement all methods of that interface?

  1. Yes, always it should implement

  2. No, Never

  3. No, Not when A is abstract

  4. None of the above


Correct Option: C

Following code will result in: class A { public static void main(String [] args) {A a = new B(); }} class B extends A {}

  1. Compiler error

  2. Runtime Exception

  3. No errors

  4. Runtime Error


Correct Option: C

Following code will result in: class A { public static void main(String [] args) {B b = new A(); }} class B extends A {}

  1. Compile error

  2. Runtime Exception

  3. No error

  4. Rintime Error


Correct Option: A

Following code will result in: class A { int b = 1; public static void main(String [] args) { System.out.println("b is " + b); }}

  1. Compilation error

  2. Runtime Error

  3. Runtime Exception

  4. Output of b is 1


Correct Option: A

Following code will result in: float a = 9/0;

  1. Compilation error: Divisions must be in a try block

  2. Compilation error: DivideByZeroException

  3. Runtime Exception

  4. No Error: a is NaN


Correct Option: D

Following code will result in: int a = 9/0;

  1. Compilation error: Divisions must be in a try block.

  2. Compilation error: DivideByZeroException

  3. Runtime Exception - correct answer

  4. No Error: a is NaN


Correct Option: C

Following code will result in: int a1 = 5; double a2 = (float)a1;

  1. Compilation error

  2. Runtime error

  3. Runtime exception

  4. No error


Correct Option: D

Following code will result in: int a = 3.5;

  1. Compilation error

  2. Runtime error

  3. a being 3.5

  4. a being 3


Correct Option: A

Which are two statements for outputing the text in PHP?

  1. print and display

  2. display and echo

  3. println and display

  4. echo and print


Correct Option: D

PHP is a loosely typed language?

  1. True

  2. False


Correct Option: A

PHP stands for?

  1. Pre Hypertext Processor

  2. Preprocessor Hypertext

  3. Hypertext Preprocessor

  4. Processor Hypertext Pre


Correct Option: C

PHP is a client- side scripting language?

  1. True

  2. False


Correct Option: B

JAVA 1.4 introduced the concept of Generics?

  1. True

  2. False


Correct Option: B

Who is the loose character in java??

  1. class

  2. interface

  3. package

  4. data type


Correct Option: B
+ View questions