You are on page 1of 4

KEY for SCJP Text Book

Chapter 1 Data Types


1. b,c 2. e 3. a 4. c
5. 01111010 6. 1….110110
10000000 1….110011
00001111 1….110100

11110011 0….001000
7. 127,-2^7,-1,-8,+7 8. false 9. -128 10. -126 11. 2^15
12. 0
Previous SCJP Questions
1 a, d
Chapter 2 Primitive Type Conversion
1. true 100 2. CTE 3. CTE 4. 33 5. d 6. CTE
7. CTE 8. CTE 9. CTE 10. c $ 11. $ c 12. 34 45 56
13. CTE 14. CTE 15. CTE 16. CTE
Chapter 3 Operators
1. 0 0 2. True 0 3. True 4. False 1 5. False 2 6. CTE
7. 5 8. -126 9. 2,-1, 1,-1 10. 1.8 11. true, false, false, true
12. false, true, true, true
Chapter 4 Express Evaluation
1. 5 2. 5 3. 195 4. 195ABC 5. ABCab 6. 195ab
7. CTE 8. 1,1 9. 1,2,3,4,1 10. 5 11. -2 -1 2^31-1
12. fgh17 13. false, false, true, true
Chapter 5 Control Statements
1. CTE 2. C 3. ABC BCC 4. CTE 5. Five 6. Default
7. CTE 8. CTE 9. vwxxyzz 10. 1
Previous SCJP Questions
1. E 2. C 3. B
Chapter 6 Local,Instance Variables & Methods
1. 0 0.0 2. 000.0 3. CTE 4. 5 5. CTE 6. null
7. A 8. 10 9. 0 10. CTE 11. A A(int)
12. A(int, boolean) A(Boolean, int)
13. CTE 14. CTE 15. 11
Chapter 7 Static Variables & Methods
1. CTE 2. CTE 3. 3 3 4. 25 25 5. 3 4 6. 104
7. 9 8. 10 20
Previous SCJP Questions
1. B,C
Chapter 8 Arrays
1. a,b,e 2. a,e 3. a,b,d 4. d 5. a 6. b
7. 0 8. 10 9. 60 10. 10 11. CTE 12. 4
13. 2,3,4,0 14. 15 15. 16
Previous SCJP Questions
1. D 2. A,B
Chapter 9 Inheritance
1. 10 2. 10 15 3. 10 20 4. CTE 5. A B 6. A B C
7. A B 0 0 8. B(int) A 9. 10 15 10. 2 3 11. 10 3 12. CTE
Previous SCJP Questions
1. D 2. C 3. D 4. A,D 5. A
Chapter 10 Overloading-Overriding
1. a,c,e 2. a,c,d 3. c,d 4. yes 5. a,b,ef
6. B-Overloading C-Overriding D- Overriding
7. I was in super class The value of J is 5
8. m1 of A m1 of A m1 of A
Previous SCJP Questions
1. C,D 2. B,C,E 4. C 5. B 6. B 7. A,C,E,F,G
8. D
Chapter 11 Polymorphism & Dynamic Binding
1. m1 of A m1 of B m2 of A
2. m3 of A m1 of B m2 of A m3 of C
3. Value is 5 This Value is 6
4. m1 of B m2 of A m3 of C
5. m1 of B m2 of A m3 of C
6. CTE
Previous SCJP Questions
1. A,E,F 2. A 3. B 4. D 5. B 6. A
7. C 8. E
Chapter 12 Access Specifiers & Packages
1. a) b,d,read1,read2 b) b,c,d,read1,read2,read3
2. a)B,C b)A,B,C 3. a)B,C,D,E b)A,B,C,D,E 4. 5. b
6. 7. 8. 9. 10. 11.
Previous SCJP Questions
1. B,C 2. F 3. C 4. D 5. F 6. B
7. D 8. C 9. C 10. B,D,G
Chapter 13 Abstract classes & Interfaces,Final
1. e 2. c,f 3. a,f 4. c,d 5. c,d 6. e
7. d 8. b 9. b,c,d 10. none 11. b 12. b
13. c 14. a,e 15. All
Previous SCJP Questions
1. A,B,D 2. D 3. A 4. A,B,D 5. F 6. A
7. C 8. B 9. B,C,F 10. A 11. B,E 12. B,C,D
13. B,E,F
Chapter 14 Exception handling & Assertions
1. a 2. a,b,c 3. c 4. d 5. b 6. a
7. try block finally block 8. try block finally block
9. After catch 10. Finally 11. Inside catch After catch
12. Inside catch finally after final
13. Inside catch 14. finally 15. finally 16. d 17. a,b,c,d
Previous SCJP Questions
1. C 2. B,C,E 3. E 4. A 5. A 6. F
7. A 8. E 9. B 10. B,E 11. C 12. B,C,E
13. D 14. D 15. E 16. B 17. C 18. D
19. D
Chapter 15 Garbage Collection
1. 1 2. 1 3. 2 4. 0 5. 2 6. d
7. a,b,c 8. b,c 9. c 10. 0 11. No 12. 9
13. a,c,e 14. a,d 15. E

Previous SCJP Questions


1. D 2. A 3. D 4. E
Chapter 16 Free-floating & Static blocks
1. 15 3 2. 3 3. 15 15 4. 13 5. 2 6. 2 2
7. 2 4 4 8. 2 4 4 9. 4 4 4
10. 4 4 11. 4 4 4
Chapter 17 String, StringBuffer, StringBuilder
1. b 2. Equal 3. UnEqual 4. UnEqual 5. a 6. Equal
7. b 8. e 9. Hello 10. .equals() succeeded 11. Hello dear
12. a 13. a 14. c
Previous SCJP Questions
1. D 3. D 4. A 5. D 6. B 7. B,E
8. C 9. D
Chapter 18 Wrapper classes
1. e 2. a,b,c 3. c 4. true 5. c 6. CTE
7. false 8. 2,5,6 9. Same equal 10. equal 11. equal
12. equal
Previous SCJP Questions
1. A 2. C,E 3. A 4. D 5. B,C 6. B
7. A 8. C,D 9. C,F 10. D 11. D 12. B
13. A,D 14. A
Chapter 19 MultiThreading
1. a,b,c 2. a,c,d 3. d 4. c 5. a 6. d
7. b 8. MyThread bar bar 9. b,d
10. Can’t say Thread one Thread two
11. Inside f 12. B 13. Can’t say 14. 1
Previous SCJP Questions
1. E 2. B 3. C 4. A,D 5. E 6. C,E,F
7. C 8. D,E 9. E 10. E 11. A,C,E 12. B
13. D,F 14. E 15. E 16. C,E,F 17. C 18. B
19. E 20. D,F 21. C 22. B 23. A,D 24. E
Chapter 20 File IO
1. b,c 2. b 3. a 4. a 5. e 6. b
7. c 8. c 9. c 10. b 11. a,c 12. c
Previous SCJP Questions
1. E 2. B 3. D 4. B,D,E 5. B 6. C
7. B 8. E
Chapter 21 Collections-I
1. c 2. e 3. e 4. d 5. b 6. c
7. c 8. d 9. b 10. b 11. a 12. abc
13. c 14. d 15. a 16. b 17. B 18. D
Chapter 22 Collections-II
1. is is a a 2. def abc xyz pqr null
3. false 3 4. True xyz -1
5. true 2 6. abc def pqr xyz
7. def abc xyz pqr 8. def abc xyz pqr
9. def abc abcd xyz pqr 10. 2 11. B 12. D
Previous SCJP Questions
1. D 2. B 3. A 4. B 5. B 6. A
7. B 8. C 9. A,C,F 10. F 11. C
Chapter 23 Generics
1. a 2. CTE 3. classcastException 4. CTE 5. D
7. A 9. B 10. B,D 11. 2
Previous SCJP Questions
1. A,D,E 2. D,F 3. C 4. G 5. B 6. A,C,F
8. A 15. D 17. C
Chapter 24 Inner classes
1. B 2. D 3. B 4. C
Chapter 25 CommandLine Arguments, Varargs
Previous SCJP Questions
1. A,D 1. C 2. D,E 3. B 4. C 5. D
6. D 7. B 8. B,D 9. A 10. C 11. D,E
Chapter 26 Enums
2. D 3. A 4. E 6. D

You might also like