SCJP MOCK EXAM-01 MCQ Question

SCJP MOCK EXAM-01 MCQ Question
11. What it will print?
  • 1
  • error
  • -1
  • 0
Show Answer
12. The default no-argument constructor created by Java is
  • public
  • protected
  • private
  • default type
Show Answer
13. If you have two methods in a class:
  • work fine
  • ambiguous
  • run time error
Show Answer
14. Which is/are the correct declaration of an array
  • int[] iA
  • int [4] iA
  • int [][4] iAA
  • int [][]iAA
Show Answer
15. choose the correct statement for above declaration.
  • It allocate 5 places for storing 5 references to abc
  • It allocate 5 objects for storing 5 references to abc
  • It allocates 5 objects only
  • ALL
Show Answer
16. what is correct ways to explicitly initialize arrays
  • for(int i=0; i
  • A=new abc[] {new abc(),new abc(),new abc(),new abc(),new abc()};
  • A is correct but B is wrong
  • B is correct but A is wrong.
Show Answer
17. Whether this declaration is true or false
  • TRUE
  • FALSE
Show Answer
18. Can A class run without a main method.
  • TRUE
  • FALSE
Show Answer
19. we know that true, false, and null are not key word, can i use then as identifier name.
  • TRUE
  • FALSE
Show Answer
20. Class members which are of type static or non-static they are ALWAYS
  • initialized automatically to their default values
  • only non-static members need to initializ explicitly.
  • only static members need to initializ explicitly.
  • both members are need to initializ explicitly.
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test