SCJP MOCK EXAM-01 MCQ Question Questions and Answers
Practice ModeShowing 10 of 41 questions
Q1
Which of the following are valid for declaring and initialising a boolean variable?
Answer: Option
Q2
Select the valid declarations.
Answer: Option
Q3
What it will print?System.out.println(Math.round(-4.7));
Answer: Option A
Q4
What it will print? System.out.println(Math. ceil (-4.7));
Answer: Option B
Q5
What it will print? System.out.println(Math.floor(-4.7));
Answer: Option A
Q6
What it will print? System.out.println(2 + 3 +"");
Answer: Option D
Q7
What it will print? System.out.println(2 + "" + 3 );
Answer: Option C
Q8
What it will print? System.out.println("" + 2 + 3 );
Answer: Option C
Q9
What it will print?
Answer: Option B
Q10
What it will print?
int x= -7 % -2
System.out.println(x);
Answer: Option C