Tag: programming languages

Questions Related to programming languages

Multiple choice technology programming languages
  1. foreach(x) System.out.println(z);

  2. for(int z : x) System.out.println(z);

  3. while( x.hasNext()) System.out.println( x.next());

  4. for( int i=0; i< x.length; i++ ) System.out.println(x[i]);

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Multiple choice technology programming languages
  1. The code on line 31 throws an exception

  2. The code on line 33 throws an exception

  3. The code on line 35 throws an exception

  4. The code on line 33 executes successfully

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

  2. Foo f= (Alpha)x;

  3. Foo f= (Delta)x;

  4. Beta b = (Beta)(Alpha)x;

Reveal answer Fill a bubble to check yourself
C Correct answer