programming languages Online Quiz - 133

programming languages Online Quiz - 133

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following cannot be used as a modifier for instance variables while defining a class?

  1. Synchronized
  2. Native
  3. Strictfp
  4. All of these
Question 2 Multiple Choice (Single Answer)

What is the output of the program?

  1. 100
  2. Run time Exception. A final object cannot be changed
  3. Compilation Error. A final object cannot be changed
  4. Compilation Error: There cannot be any final objects in a method
Question 3 Multiple Choice (Single Answer)

What is the output of the program?

  1. Compilation fails
  2. 100
  3. RunTime Exception
  4. 0
Question 4 Multiple Choice (Single Answer)

What is the output of the program?

  1. Blue
  2. 2
  3. Runtime Exception
  4. Compilation Error
Question 5 True/False

can versioning concept applicable to Private assemblies?

  1. True
  2. False
Question 6 True/False

Does XML replace HTML?

  1. True
  2. False
Question 7 True/False

Does XML replace HTML?

  1. True
  2. False
Question 8 Multiple Choice (Single Answer)

Class C { public static void main(String[] args) { int[]a1[]=new int[3][3]; //3 int a2[4]={3,4,5,6}; //4 int a2[5]; //5 }} What is the result of attempting to compile and run the program ?.

  1. compiletime error at lines
  2. compiltime error at line 4,5
  3. compiletime error at line 3
  4. Runtime Exception
  5. None of the above
Question 9 Multiple Choice (Single Answer)

interface I{ void f1(); // 1 public void f2(); // 2 protected void f3(); // 3 private void f4(); // 4 } which lines generate compile time errors?

  1. compiletime error at lines 1,2,3,4
  2. compiletime error at line 3
  3. compiletime error at line 1
  4. compiletime error at lines 3,4
  5. None of the above
Question 10 Multiple Choice (Single Answer)

class C{ int i; public static void main (String[] args) { int i; //1 private int a = 1; //2 protected int b = 1; //3 public int c = 1; //4 System.out.println(a+b+c); //5 }}

  1. compiletime error at lines 1,2,3,4,5
  2. compiletime error at lines 2,3,4,5
  3. compiletime error at lines 2,3,4
  4. prints 3
  5. None of the above