0% found this document useful (0 votes)
2 views4 pages

Java Programming QB For End Sem

The document is a comprehensive Java programming question bank divided into six units covering topics such as Object Oriented Thinking, Classes and Inheritance, Interfaces and Java API, Exception Handling and Multithreading, Applets and Swing, and Event Handling and AWT. Each unit contains multiple questions that explore fundamental concepts, programming techniques, and Java components with examples and explanations. This resource serves as a study guide for understanding Java programming and its various features.

Uploaded by

karanaskand221
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Java Programming QB For End Sem

The document is a comprehensive Java programming question bank divided into six units covering topics such as Object Oriented Thinking, Classes and Inheritance, Interfaces and Java API, Exception Handling and Multithreading, Applets and Swing, and Event Handling and AWT. Each unit contains multiple questions that explore fundamental concepts, programming techniques, and Java components with examples and explanations. This resource serves as a study guide for understanding Java programming and its various features.

Uploaded by

karanaskand221
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Programming Question Bank

Unit 1: Object Oriented Thinking and Java Basics


1. Explain command-line arguments in Java with a sample program.

2. List and explain different data types supported by Java.

3. Discuss operators in Java. Explain arithmetic, relational, logical, and bitwise operators
with examples.

4. Explain Java Program Structure with a suitable example.

5. Explain the working of the Scanner class. Write a program to read integer input.

6. Write a note on typecasting in Java with examples.

7. What is an Array in Java? Explain its declaration, creation, and initialization.

8. Describe the architecture of JVM with a diagram and explain each component.

9. Differentiate between Buffered Reader and Scanner class.

10. What are Java Tokens? Explain each type with examples.

11. Explain different types of Loops in Java with syntax.

12. Describe the steps involved in writing, compiling, and executing a Java program.

Unit 2: Classes, Objects and Inheritance


1. Describe polymorphism in detail and explain its significance.

2. Explain the concept of encapsulation with example.

3. Write a Java program to demonstrate the use of class and object.

4. Explain the use of this keyword with examples.

5. Define inheritance and state its advantages.

6. Explain the purpose of static keyword.

7. Differentiate method overloading and method overriding with examples.

8. Explain single, multilevel and hierarchical inheritance with diagrams.

9. Explain the uses of super keyword with example.


10. Explain constructor overloading with example.

11. What are arrays of objects? Explain with program.

12. Compare protected and default access specifiers with examples.

Unit 3: Interfaces, Packaging and Java API


1. Discuss Wrapper Classes with example and list primitive wrapper classes.

2. Differentiate between class and interface.

3. Explain Auto-boxing and Unboxing with examples.

4. Explain Java access specifiers.

5. Explain Java I/O stream hierarchy.

6. Explain the steps to define, create and access a package.

7. What is a package? Explain advantages.

8. Why are wrapper classes required in Java collections?

9. Explain File, FileInputStream and FileOutputStream classes.

10. Explain [Link] package and any five important classes.

Unit 4: Exception Handling and Multithreading


1. Explain Exception Handling and its benefits.

2. Explain try, catch, throw, throws and finally with program.

3. Describe Java Exception Hierarchy with checked and unchecked exceptions.

4. Explain life cycle of a thread.

5. Explain methods of creating threads.

6. Explain user-defined exception subclasses with program.

7. Differentiate throw and throws.

8. Explain thread synchronization with examples.

9. Explain any five built-in exceptions.

10. Explain multithreading and differentiate it from multitasking.


11. Explain the role of finally block.

Unit 5: Applets and Swing


1. Explain Trees in Swing using JTree and applications.

2. Differentiate AWT and Swing components.

3. Explain the role of JFrame with program.

4. Explain Applet life cycle with diagram.

5. Explain Combo Boxes and Tabbed Panes with examples.

6. Explain MVC architecture used in Swing.

7. Explain steps involved in creating and executing Applet.

8. Explain JButton class and event handling mechanism.

9. Explain Scroll Panes and usability.

10. Differentiate Java Applets and Java Applications.

11. Explain JTextField and its methods.

12. Explain init(), start(), paint(), stop() and destroy().

13. Explain Check Boxes and Radio Buttons.

14. Explain types of Applets and security restrictions.

15. Explain Icons and Labels in Swing.

Unit 6: Event Handling and AWT


1. What are event listeners? Explain listener interfaces.

2. Differentiate Inheritance Event Model and Delegation Event Model.

3. Explain Mouse Events and MouseListener methods.

4. Explain event handling using listener interfaces with example.

5. Explain Delegation Event Model with diagram.

6. Explain Choice and List components.

7. Explain Keyboard Events and KeyListener methods.


8. Explain adapter classes and their role.

9. Explain AWT components: Label, Button and Canvas.

10. Explain GridLayout and CardLayout.

11. Explain GridBagLayout and its flexibility.

12. What is a layout manager?

13. Explain BorderLayout and FlowLayout.

14. Explain Graphics class and methods for drawing shapes and text.

You might also like