Tag: programming languages

Questions Related to programming languages

Given: 25.intx=12; 26. while (x < 10) { 27. x--; 28. } 29. System.out.print(x); What is the result?

  1. 0

  2. 10

  3. 12

  4. Line 29 will never be reached.


Correct Option: C
  1. An exception may be thrown at runtime.

  2. The code may run with no output, without exiting.

  3. The code may run with no output, exiting normally.

  4. The code may rum with output “A B A B C C “, then exit.

  5. The code may rum with output “A B C A B C A B C “, then exit.

  6. The code may ruin with output “A B C A A B C A B C “, then exit.


Correct Option: E,F
  1. public int blipvert(int x) { return 0; }

  2. protected long blipvert(int x, int y) { return 0; }

  3. private int blipvert(long x) { return 0; }

  4. protected long blipvert(int x) { return 0; }

  5. protected int blipvert(long x) { return 0; }

  6. protected long blipvert(long x) { return 0; }


Correct Option: A,B,C,E,F