SCJP MOCK EXAM-01 MCQ Question Questions and Answers

Take Exam

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.
Show Answer Report

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
Show Answer Report

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";
Show Answer Report

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
Show Answer Report

25. what will be the output

  • 5 7
  • 5 8
  • 6 8
  • 6 7
Show Answer Report

26. what will be the output

  • 120
  • 50 70
  • error
  • 3500
Show Answer Report

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
Show Answer Report

28. Is this code legal ?

  • TRUE
  • FALSE
Show Answer Report

29. Is this legal

  • TRUE
  • FALSE
Show Answer Report

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
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test