TAILIEUCHUNG - Trắc nghiệm Core Java

Tham khảo tài liệu 'trắc nghiệm core java', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Trắc nghiệm Core Java 1. Which of the following statements are valid given the following variable declarations boolean a boolean b int c Select a valid answer A a c C a A b c B a a D a c Answer B Mark 2. Which of the following can be applied to constructors Select a valid answer A final B static C synchronized D None of these. Answer D Mark 3. Which of the following retain their preferred size width and height when added individually to the North section of a container with a BorderLayout assume that no other components or containers are present in the North section . Select a valid answer A TextArea B Button C TextField D Checkbox Answer D Mark 4. Which of the following are legal names for variables. Select a valid answer A int B large C Integer D 2much Answer C Mark 5. Consider the following piece of code and select the correct statement from the following. String s new String abcdefgh 1 d q 2 s 3 Select the one right answer A The code fails to compile reporting an error at line 2. Strings are immutable and therefore a replace method is meaningless. C The code compiles correctly and displays the text abcdefgh . Answer C Mark B The code compiles correctly and displays the text abcqefgh . D The code compiles but an exception is thrown when line 2 is executed. 6. Which of the following keywords can be applied to the variables or methods of an interface. Select all valid answers A static B private C public D protected Answer A C Mark 7. Consider the following piece of code and select the correct statement s 1. class A 2. protected int method 3. 4. 5. 6. class B extends A 7. int method 8. 9. Select all valid answers A The code fails to compile because you can t override a method to be more private than its parent. C The code fails to compile. However it can be made to compile correctly by prefixing line 7 with the access qualifier protected . Answer A C D Mark B The code fails to compile because method is .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.