-
19-12-2015, 03:46 PM #1Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Một số câu hỏi trong đề thi thử scjp
Đây là lần đâu đăng bài nếu có gì sai sót về tiêu đề mong mod xử nhẹ [IMG]images/smilies/kiss.gif[/IMG]
Câu 1, Given:
31. // some code here
32. try {
33. // some code here
34. } catch (SomeException se) {
35. // some code here
36. } finally {
37. // some code here
38. }
Under which three circumstances will the code on line 37 be executed?
(Choose three.)
A. The instance gets garbage collected.
B. The code on line 33 throws an exception.
C. The code on line 35 throws an exception.
D. The code on line 31 throws an exception.
E. The code on line 33 executes successfully.
Câu 2, Given:
20. public class CreditCard {
21.
22. private String cardlD;
23. private Integer limit;
24. public String ownerName;
25.
26. public void setCardlnformation(String cardlD,
27. String ownerName,
28. Integer limit) {
29. this.cardlD = cardlD;
30. this.ownerName = ownerName;
31. this.limit = limit;
32. }
33. }
Which is true?
Answer Choices
A.The class is fully encapsulated.
B.The code demonstrates polymorphism.
C.The ownerName variable breaks encapsulation.
D.The cardlD and limit variables break polymorphism.
Câu 3
Which Man class properly represents the relationship Man has a best friend who is a Dog ?
Answer Choice
A.class Man { private BestFriend dog; }
A.class Man { private Dog bestFriend; }
A.class Man { private Dog }
A.class Man { private BestFriend }
Câu này em chọn A mà không đúng [IMG]images/smilies/Surprised.gif[/IMG], mọi người giải thích hộ em các câu còn lại với thank mọi ngườiView more random threads:
- code về hibernate
- Mới tìm hiểu java co vài chỗ khúc mắc
- Tìm gia sư lập trình Java cơ bản tại Hà Nội
- Cần giúp đỡ về Icon, Hide Systemtray và các vấn đề khác...
- Cần giúp về "This" và "Private"
- Sao repaint() mà những hình cũ vẫn còn ?
- Code java mở file .exe
- So sánh thứ tự ký tự alphabet
- Bạn nào biết làm ơn giải thích mình đoạn code nhỏ này với ạ :D
- Cần giúp đỡ về việc tính số ngày đã qua kể từ tháng 1 trong 1 năm
Mỗi liệu pháp tại Queen Spa là một hành trình chiều chuộng bản thân, giúp bạn tìm lại sức sống và năng lượng mới. Không gian của Queen Spa được thiết kế sao cho tối ưu hóa sự thoải mái và thư giãn...
Sống Đẹp và Khỏe Mạnh với Queen...