0

programming languages Online Quiz - 321

Description: programming languages Online Quiz - 321
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. 8 data types

  2. 7 data types

  3. 16 data types

  4. No special data types


Correct Option: D

A Hash variable in perl is preceded by a

  1. $

  2. %

  3. #

  4. @


Correct Option: B
  1. Push and unshift

  2. Push and shift

  3. Pop and push

  4. Shift and unshift


Correct Option: A
  1. Powerful Encryption and Report Language

  2. Practical Extraction and Report Language

  3. Practical Emotional and Rational Language

  4. Powerful Execution and Riding Language


Correct Option: B

Select two methods that correctly overload the following method? (Assume that all necessary packages have been imported). byte bMethod(short i) throws Exception {...}

  1. int bMethod(int i) throws IOException{...}

  2. protected int bMethod(short s) throws FileNotFoundException{...}

  3. private String aMethod(byte b,short s) throws Exception{...}

  4. char bMethod(String s) throws RuntimeException{...}

  5. int bMethod(short sh){...}


Correct Option: A,D
  1. for(int i=10;i>0;i-=-2);

  2. for(int i=0;i<012;i=i++);

  3. for(int i=0;i<0;i--);

  4. for(int i=0;(i++^--i)==0;i++);

  5. for(int i=010;i==10;i+=0);


Correct Option: B,D

Select two methods that correctly override the following method? (Assume that all necessary packages have been imported). protected int aMethod(int i) throws IOException {...}

  1. int aMethod(int i) throws IOException{...}

  2. protected int aMethod(int i) throws FileNotFoundException{...}

  3. public int aMethod(int i) throws Exception{...}

  4. public int aMethod(byte i) throws IOException{...}

  5. protected int aMethod(int i) throws IOException,FileNotFoundException{...}


Correct Option: B,E

Select three correct statements.

  1. A static method may override another static method.

  2. A static method cannot override a non-static method.

  3. A non-static method cannot override a static method.

  4. A non-static method may be overloaded by a static method.

  5. A synchronized method cannot be overridden.


Correct Option: B,C,D

Which of the following denote methods of HttpServlet class?

  1. doGet()

  2. doTrace()

  3. doOptions()

  4. All the Above


Correct Option: D

Which of the following helps in garbage collection?

  1. final

  2. finally

  3. finalize

  4. finalizer


Correct Option: C
  1. The above code will not compile, Vector v is not initialized.

  2. The above code will compile and throw a Runtime Exception

  3. The above code will compile and not throw any Exception during runtime. V is initialized to null

  4. None of the Above.


Correct Option: A

What does the following expression return? Math.max(Float.POSITIVE_INFINITY,Double.POSITIVE_INFINITY);

  1. Float.POSITIVE_INFINITY

  2. Double.POSITIVE_INFINITY

  3. runtime Exception

  4. None of the Above


Correct Option: B
  1. superclass

  2. subclass

  3. instance class

  4. None of the Above


Correct Option: B

What is the output of the following piece of code? if(" String ".trim() == "String") System.out.println("Welcome"); else System.out.println("Good Bye");

  1. The code will compile and print "Welcome"

  2. The code will compile and print "Good Bye"

  3. The code will cause a compiler error

  4. None of the Above


Correct Option: B
  1. The number of bytes is compiler dependent

  2. 2

  3. 4

  4. 8


Correct Option: D
- Hide questions