SCJP Test - 7 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

Questions based on SCJP

Sample Question from this online test:

Question: 1. public class test (
2. private static int j = 0;
3.
4. private static boolean methodB(int k) (
5. j += k;
6. return true;
6. )
7.
8. public static void methodA(int i) {
9. boolean b:
10. b = i < 10 | methodB (4);
11. b = i < 10 || methodB (8);
12. )
13.
14. public static void main (String args[] } (
15. methodA (0);
16. system.out.printIn(j);
17. )
18. )
What is the result?

Option A: The program prints “0”

Option B: The program prints “4”

Option C: The program prints “8”

Option D: The program prints “12”

To answer, click the "Start This Test" button below.

Start this Test






Comments

amit varshney on 2009-09-09 08:47:36 wrote,

why you are not giving the result