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

1. Which of the following are valid for declaring and initialising a boolean variable?

  • boolean b = True;
  • boolean b = 0;
  • boolean b = 1 < 2;
  • boolean b = true?false:true;
Show Answer Report

2. Select the valid declarations.

  • int i = 16.0;
  • byte b = 16.0;
  • float f = 16.0;
  • double d = 16.0;
Show Answer Report

3. What it will print?System.out.println(Math.round(-4.7));

  • -5
  • -4
  • -4.5
  • 5
Show Answer Report

4. What it will print? System.out.println(Math. ceil (-4.7));

  • -5.0
  • -4.0
  • -4.5
  • 5.0
Show Answer Report

5. What it will print? System.out.println(Math.floor(-4.7));

  • -5.0
  • -4.0
  • -4.5
  • -5.0
Show Answer Report

6. What it will print? System.out.println(2 + 3 +"");

  • 32
  • error
  • 23
  • 5
Show Answer Report

7. What it will print? System.out.println(2 + "" + 3 );

  • 32
  • error
  • 23
  • 5
Show Answer Report

8. What it will print? System.out.println("" + 2 + 3 );

  • 32
  • error
  • 23
  • 5
Show Answer Report

9. What it will print?

  • 90
  • error
  • 30
  • 900
Show Answer Report

10. What it will print? int x= -7 % -2 System.out.println(x);

  • 1
  • error
  • -1
  • 0
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test