SCJP MOCK EXAM-01 MCQ Question Questions and Answers
SCJP Mock Exam-01 MCQ Questions with Answers are ideal for candidates preparing for Java certification and IT placement tests. This mock test includes Java programming interview questions with answers that focus on core concepts such as OOPs, inheritance, and exception handling. Practicing these Java MCQs helps improve coding logic, efficiency, and exam readiness for placements at top companies like TCS, Infosys, and Wipro. This section is designed to simulate real exam conditions and provide in-depth explanations for every question.
SCJP MOCK EXAM-01 MCQ Question
Showing 10 of
41 questions
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;