0% found this document useful (0 votes)
48 views2 pages

Java Bits

This document contains 10 multiple choice questions about Java concepts. The questions cover topics like modifiers for main methods, Java language characteristics, parameter passing, garbage collection, static methods, generics advantages, PrintWriter class type, events generated by buttons and scroll bars, and inheritance types supported in Java. The key provides the correct answer for each question.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views2 pages

Java Bits

This document contains 10 multiple choice questions about Java concepts. The questions cover topics like modifiers for main methods, Java language characteristics, parameter passing, garbage collection, static methods, generics advantages, PrintWriter class type, events generated by buttons and scroll bars, and inheritance types supported in Java. The key provides the correct answer for each question.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. When declaring the main method, which modifier must come first, public or static?

[ ]
a) public b) static c) both d) None
2. Java language is [ ]
a) Robust b) Multithreaded c) Architecture Neutral d) All of the above

3. If a method takes primitive types as a parameter, then Java uses [ ]


a) Call-by-value b) call-by-reference c) both d ) None
4. Just before Garbage Collector runs, which method is called [ ]
a) final() b) gc( ) c) finalize( ) d) main( )
5. A static method can [ ]
a) directly access Instance variable b) refer this c) refer super d) None
6. Advantage of Generics [ ]
a) Type-safety b) run time checking c) a & b d) None
7. PrintWriter class is [ ]
a) Character stream b) byte stream c) character & byte stream d) None
8. Button class generates ________________________Event.
a) Item b) Adjustment c) Action d) All
9. __________ inheritance is not supported by JAVA.
a) Multilevel b) Single c) Hierarchical d) multiple
10. ScrollBar generates ___________________________event.
a) Item b) Adjustment c) Action d) All

Key:

1. C

2. D

3. A

4. C

5. D

6. A
7. A

8. C

9. D

10. B

You might also like