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

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

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

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

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

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

36. What will the output be ?

  • Prints - Default , A , B , C
  • Prints - A
  • Prints - B , C
  • Prints - A, B , C , Default
Show Answer Report

37. What will be printed out when this method runs ?

  • 64
  • 53
  • 76
  • 0
Show Answer Report

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

39. Which of the following are valid declarations?

  • int i= 0XCAFE;
  • boolean b = 0;
  • char c = 'A';
  • byte b = 128;
Show Answer Report

40. What is the result that will be printed out ?

  • 2
  • 0
  • 3
  • 2.5
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test