SCJP MOCK EXAM-01 MCQ Question
SCJP MOCK EXAM-01 MCQ Question
31. What is the result of attempting to compile and run the following
- Compiler error
- Runtime exception
- Compiles and runs printing out 0
- None of these
32. What is the result of trying to compile and run this
- Compiles without error and runs printing out 1 twice
- Compiles without error and runs printing out 0 followed by 1
- Compiles without error and runs printing out 0 twice.
- Runtime error
33. What is the result of trying to compile and run this?
- The code will fail to compile
- The code will run with no out put
- This will run and print 0, 1 , 2 and "bye"
- This will run and print 1 and "bye"
34. What is the result of trying to compile and run this?
- Prints "Hello world" once
- Prints "Hello world" twice
- Compiler error
- Runs without any output
35. What is the result of attempting to compile and run this.
- The code will not compile.
- It will run and print "Hello world" twice.
- It will run and print "Hello world" once.
- It will run and print "Hello world" thrice.
36. What will the output be ?
- Prints - Default , A , B , C
- Prints - A
- Prints - B , C
- Prints - A, B , C , Default
38. What will happen if you try to compile and run this?
- It will fail to compile
- Runtime error
- Compiles and runs with no output.
- Compiles and runs printing "Hello"
39. Which of the following are valid declarations?
- int i= 0XCAFE;
- boolean b = 0;
- char c = 'A';
- byte b = 128;