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

we cannot override a non-abstract method as abstract.

  1. True

  2. False


Correct Option: B

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
  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
  1. Does not compile saying binary operator has invalid use

  2. 2.0

  3. 2.5

  4. exception will be thrown


Correct Option: B

Consider the following declarations ... float f = 4.5; //1 double d = 9.22; //2 short s = 3; //3 char c = s; //4 Which lines will throw error if any?

  1. 1 and 4

  2. 1

  3. 2 and 3

  4. 3 and 4

  5. no error


Correct Option: A
  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

Based on Simonyi's convention, the notation "w" implies:

  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

All variables in an Interface are by default __________.

  1. public

  2. final

  3. static

  4. all the above

  5. there should not be any variable in an interface


Correct Option: D
  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