0

programming languages Online Quiz - 212

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

Given: class Eggs { int doX(Long x, Long y) { return 1; } int doX(long... x) { return 2; } int doX(Integer x, Integer y) { return 3; } int doX(Number n, Number m) { return 4; } public static void main(String[] args) { new Eggs().go(); } void go () { short s = 7; System.out.print(doX(s,s) + " "); System.out.println(doX(7,7)); } } What is the result?

  1. 1 1

  2. 2 1

  3. 3 1

  4. 4 1

  5. 2 3

  6. 4 3


Correct Option: F

Given: 1. class Zippy { 2. String[] x; 3. int[] a [] = {{1,2}, {l}}; 4. Object c = new long [4] ; 5. Object[] d = x; 6. } What is the result?

  1. Compilation succeeds.

  2. Compilation fails due only to an error on line 3.

  3. Compilation fails due only to an error on line 4.

  4. Compilation fails due only to an error on line 5.

  5. Compilation fails due only to an error on line 3 and 5.

  6. Compilation fails due only to an error on line 3,4 and 5.


Correct Option: A

Given: class Fizz { int x = 5; public static void main(String[] args) { final Fizz f1 = new Fizz(); Fizz f2 = new Fizz(); Fizz f3 = FizzSwitch(f1,f2); System.out.println((f1 == f3) + " " + (f1.x == f3.x)); } static Fizz FizzSwitch(Fizz x, Fizz y) { final Fizz z = x; z.x = 6; return z; } } What is the result?

  1. true true

  2. true false

  3. false true

  4. false false

  5. Compilation fails.

  6. An exception is thrown at runtime.


Correct Option: A

Given: 1. class Bigger { 2. public static void main(String[] args) { 3. // insert code here 4. } 5. } 6. class Better { 7. enum Faster {Higher, Longer}; 8. } Which, inserted independently at line 3, will compile? (Choose all that apply.)

  1. Faster f = Faster.Higher;

  2. Faster f = Better.Faster.Higher;

  3. Better.Faster f = Better.Faster.Higher;

  4. Bigger.Faster f = Bigger.Faster.Higher;

  5. Better. Faster f2; f2 = Better.Faster.Longer;

  6. Better b; b.Faster = f3; f3 = Better.Faster.Longer;


Correct Option: C,E

What are the check tables and value tables?

  1. Check table will be at field level checking.

  2. Value table will be at domain level checking

  3. Value table will be at field level checking

  4. Check table will be at domain level checking


Correct Option: A,B

How many types of tables exist in data dictionary?

  1. Transparent tables

  2. Internal Table

  3. Pool tables

  4. Cluster tables


Correct Option: A,C,D

Is Session Method, Asynchronous or Synchronous?

  1. Asynchronous

  2. Synchronous

  3. Synchronous and Asynchronous

  4. None of above


Correct Option: B
  1. Message-driven beans (MDBs)

  2. EJB query language (EJB-QL)

  3. Support for Web services

  4. All of the Above

  5. Only 1 & 2

  6. Only 1 & 3


Correct Option: D
  1. Entity beans are permanent business entities

  2. Entity Beans are persistence objects

  3. EntityBeans are permanent

  4. All of the Above

  5. Only 1 & 2

  6. Only 1 & 3


Correct Option: D
  1. Java Messaging Service

  2. Java Message Service

  3. Java Messenger Service

  4. Java Model Security


Correct Option: A
- Hide questions