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
21. local variables which are declared inside a method ALWAYS:
- initialized automatically to their default values
- members are need to initializ explicitly.
22. Select the true statements.
- Transient methods cannot be overridden
- A final class may not be subclassed.
- A private method can never be overridden to become public
- An abstract class may contain final methods
23. Which of the following are valid for declaring and intialising a char variable?
- char c = 'a';
- char c = '\'';
- char c = '\n';
- char c = "a";
24. What will happen if the main function will declared as:
- It will compile and run successfully.
- It will not compile
- It will compile but the program will throw exception at runtime saying there is no main method.
- None of these
27. What is the result of attempting to compile and run this
- The code will not compile.
- Runtime exception
- Compiles and runs printing out
- None of these
30. What is the result of attempting to compile and run this code
- The code will compile and run printing out value = 1
- The code will compile and run printing out value = 0
- The code will fail to compile because i has not been initialised
- Run time error