Questions Related to technology

Multiple choice technology programming languages
  1. String doFileWork() { return "b"; }

  2. String doFileWork() throws IOException ( return "b"; }

  3. String doFileWork(int x) throws IOException { return "b"; }

  4. String doFileWork() throws FileNotFoundException { return "b"; }

  5. String doFileWork() throws NumberFormatException { return "b"; }

  6. String doFileWork() throws NumberFormatException, FileNotFoundException { return "b"; }

Reveal answer Fill a bubble to check yourself
A,D,E,F Correct answer
Multiple choice technology programming languages
  1. -f and java.ArrayIndexOutOfBoundsException

  2. -f

  3. ArrayIndexOutOfBoundsException

  4. None of these.

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

  2. -c

  3. -c2

  4. -2c

  5. -c22b

  6. Compilation fails.

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology programming languages
  1. Just L1 is sufficient.

  2. Just L2 is sufficient.

  3. Just L3 is sufficient.

  4. Both L1 and L2 are required.

  5. Both L1 and L3 are required.

  6. Both L3 and L2 are required.

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Multiple choice technology programming languages
  1. for(int y : x) {

  2. for(x : Int y) {

  3. int y = 0; for(y : x) {

  4. for(int y=0, z=0; z<x.length; z++) { y = x[z];

  5. for(int y=0, int z=0, int z=0; z<x.length; z++) { y = x[z];

  6. int y = 0; for(int z=0; z<x.length; z++) { y = x[z];

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

  2. abcde

  3. Compilation fails due only to an error on line 7.

  4. Compilation fails due to errors on multiple lines.

  5. Compilation fails due only to an error on line 10.

  6. Compilation fails due only to an error on line 11.

Reveal answer Fill a bubble to check yourself
F Correct answer