Tag: programming languages

Questions Related to programming languages

Multiple choice technology programming languages
  1. Starting of Main block Static block In the Main block Display block

  2. Static block Display block Starting of Main block In the Main block Display block

  3. Error: Non static method cannot accessed from static context

  4. Starting of Main block In the Main block Display block

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. The type List is assignable to List<A>.

  2. The type List<Object> is assignable to List<?>.

  3. The type List<D> is assignable to List<? extends B>.

  4. The type List<? extends A> is assignable to List<A>.

  5. The type List<Object> is assignable to any List reference.

  6. The type List<? extends B> is assignable to List<? extends A>.

Reveal answer Fill a bubble to check yourself
B,C,F Correct answer
Multiple choice technology programming languages
  1. Error: Super(java.lang.String) in Super cannot be applied to ()

  2. First Second

  3. Second First

  4. Runtime Exception

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. A

  2. B

  3. C

  4. D

  5. E

  6. F

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Multiple choice technology programming languages
  1. n = 100;

  2. i.setX( 100);

  3. o.getY().setX( 100);

  4. i = new Inner(); i.setX( 100);

  5. o.setY( i); i = new Inner(); i.setX( 100);

  6. i = new Inner(); i.setX( 100); o.setY( i);

Reveal answer Fill a bubble to check yourself
B,C,F Correct answer
Multiple choice technology programming languages
  1. A

  2. B

  3. C

  4. D

  5. E

Reveal answer Fill a bubble to check yourself
D,E Correct answer
Multiple choice technology programming languages
  1. A

  2. B

  3. C

  4. D

  5. E

Reveal answer Fill a bubble to check yourself
B,E Correct answer
Multiple choice technology programming languages
  1. The application will crash.

  2. The code on line 29 will be executed.

  3. The code on line 5 of class A will execute.

  4. The code on line 5 of class B will execute.

  5. The exception will be propagated back to line 27.

Reveal answer Fill a bubble to check yourself
B,E Correct answer
Multiple choice technology programming languages
  1. public void foo() { }

  2. public int foo() { return 3; }

  3. public Two foo() { return this; }

  4. public One foo() { return this; }

  5. public Object foo() { return this; }

Reveal answer Fill a bubble to check yourself
C,D Correct answer