SCJP MOCK EXAM-01 MCQ Question Questions and Answers

Practice Mode
Showing 10 of 41 questions
Q11
What it will print?
  • A 1
  • B error
  • C -1
  • D 0
Answer: Option C
Q12
The default no-argument constructor created by Java is
  • A public
  • B protected
  • C private
  • D default type
Answer: Option D
Q13
If you have two methods in a class:
  • A work fine
  • B ambiguous
  • C run time error
Answer: Option B
Q14
Which is/are the correct declaration of an array
  • A int[] iA
  • B int [4] iA
  • C int [][4] iAA
  • D int [][]iAA
Answer: Option
Q15
choose the correct statement for above declaration.
  • A It allocate 5 places for storing 5 references to abc
  • B It allocate 5 objects for storing 5 references to abc
  • C It allocates 5 objects only
  • D ALL
Answer: Option A
Q16
what is correct ways to explicitly initialize arrays
  • A for(int i=0; i<A.length;i++)A[i] = new abc();
  • B A=new abc[] {new abc(),new abc(),new abc(),new abc(),new abc()};
  • C A is correct but B is wrong
  • D B is correct but A is wrong.
Answer: Option C
Q17
Whether this declaration is true or false
  • A TRUE
  • B FALSE
Answer: Option A
Q18
Can A class run without a main method.
  • A TRUE
  • B FALSE
Answer: Option A
Q19
we know that true, false, and null are not key word, can i use then as identifier name.
  • A TRUE
  • B FALSE
Answer: Option A
Q20
Class members which are of type static or non-static they are ALWAYS
  • A initialized automatically to their default values
  • B only non-static members need to initializ explicitly.
  • C only static members need to initializ explicitly.
  • D both members are need to initializ explicitly.
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test