0

programming languages Online Quiz - 9

Description: programming languages Online Quiz - 9
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. It can extend exactly one class and implement exactly one interface.

  2. It can extend exactly one class and can implement multiple interfaces.

  3. It can extend exactly one class or implement exactly one interface.

  4. It can implement multiple interfaces regardless of whether it also extends a class.


Correct Option: C

Which is true about a method-local inner class?

  1. It must be marked final.

  2. It can be marked abstract.

  3. It can be marked public.

  4. It can be marked static.


Correct Option: B
  1. Runnable r = new Runnable() { };

  2. Runnable r = new Runnable(public void run() { });

  3. Runnable r = new Runnable { public void run(){}};

  4. System.out.println(new Runnable() {public void run() { }});


Correct Option: D
  1. MyOuter.MyInner m = new MyOuter.MyInner();

  2. MyOuter.MyInner mi = new MyInner();

  3. MyOuter m = new MyOuter(); MyOuter.MyInner mi = m.new MyOuter.MyInner();

  4. MyInner mi = new MyOuter.MyInner();


Correct Option: A
  1. defined as

  2. refers

  3. owned by

  4. defined by

  5. includes

  6. has


Correct Option: A,C,E,F

Which is not a file to field relation

  1. known as

  2. has

  3. qualified by

  4. includes

  5. refers to

  6. qualified as


Correct Option: A,D,E,F
  1. defined as

  2. refers

  3. owned by

  4. includes

  5. extended by

  6. known by


Correct Option: B,F

Which is a non-keyed access path

  1. Physical

  2. Update

  3. Resequence

  4. Retrieval

  5. Span

  6. Query


Correct Option: A

What is the output of the below JavaScript?


with(Math){               
     alert(pow(2,3));       
}   
  1. 8

  2. 9

  3. error

  4. 6


Correct Option: A

What is the output of the below JavaScript?


    var currDate = new Date("30 September, 2011");
    alert(currDate.getMonth());
  1. 9

  2. 8

  3. 10

  4. error


Correct Option: B

What is the output of the below JavaScript?


var book = "Head First JavaScript";         
alert(book.length);     
  1. 21

  2. 20

  3. 22

  4. error


Correct Option: A

a = 10;         
var b = 20;         
var c = a + b;          
alert(c);   
  1. error

  2. 1020

  3. 30

  4. 20


Correct Option: C
- Hide questions