0

programming languages Online Quiz - 250

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

class P { public void doIt() {} } class C extends P { private void doIt() {}} It is not legal.

  1. True

  2. False


Correct Option: A
  1. Iterpreted Language

  2. Compiled Language

  3. Byte Code Language

  4. None of these


Correct Option: D
  1. static because it has to be constant and cannot be changed.

  2. static because it has to be loaded by the JVM without instantiating it

  3. public because other classes may also call the main method of a class

  4. public because JVM has to have access to the main method in order to call it.


Correct Option: B,D

Which of the following are valid main method declarations?

  1. static public void main(String []args)

  2. public static void main(String heyhey[])

  3. public static int main(String[] args)

  4. public static void main(String ...args)

  5. public static void main (String [], int argv)


Correct Option: A,B,D
  1. all sub-classes of Throwable

  2. not the sub classes of RuntimeException

  3. all sub-classes of Error

  4. None of these


Correct Option: B

int i=5; int a = + --i/2.0;

  1. Does not compile saying binary operator has invalid use

  2. 2.0

  3. 2.5

  4. exception will be thrown


Correct Option: B

What gets printed here... System.out.println("Sum of 5 and 3 is:"+5+3);

  1. Sum of 5 and 3 is:8

  2. error during compilation

  3. Sum of 5 and 3 is:53

  4. None of these


Correct Option: C

Based on the description above, we could say that the variable name "lAccountNum" follows the Systems Hungarian Notation.

  1. True

  2. False


Correct Option: A
  1. a byte

  2. a word

  3. a boolean

  4. a null-terminated string


Correct Option: B
  1. an array of unsigned long

  2. an array of floating-point values

  3. an array of unary

  4. an array of zero-terminated strings


Correct Option: A
  1. public

  2. final

  3. static

  4. all the above

  5. there should not be any variable in an interface


Correct Option: D

Abstract class's can have a constructor.

  1. True

  2. False


Correct Option: A
  1. a class implements one or more interfaces

  2. a class extends one or more interfaces

  3. an interface extends one of more interfaces

  4. Serializable is a marker Interface


Correct Option: B
- Hide questions