SCJP MOCK EXAM-01 MCQ Question
SCJP MOCK EXAM-01 MCQ Question
12. The default no-argument constructor created by Java is
- public
- protected
- private
- default type
14. Which is/are the correct declaration of an array
- int[] iA
- int [4] iA
- int [][4] iAA
- int [][]iAA
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
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.
19. we know that true, false, and null are not key word, can i use then as identifier name.
- TRUE
- FALSE
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.