KEMBAR78
Assignment Questions | PDF | Method (Computer Programming) | Class (Computer Programming)
0% found this document useful (0 votes)
8 views2 pages

Assignment Questions

Important Topics

Uploaded by

Anil Kumar B
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)
8 views2 pages

Assignment Questions

Important Topics

Uploaded by

Anil Kumar B
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
You are on page 1/ 2

Assignment Questions

Module-1

Unit-1: Introduction & Classes/Objects


1. Define byte code and explain why it is platform-independent.
2. List and explain any five Java buzzwords with examples.
3. Differentiate between == and .equals() in Java.
4. Write the rules for variable scope in Java with an example.
5. Explain type casting with examples of widening and narrowing.
6. Write a Java program to find the factorial of a number using recursion.
7. Demonstrate method overloading with a program for calculating areas of a circle, rectangle, and
triangle.
8. Create a class BankAccount with fields balance and account Number. Write methods for deposit,
withdrawal, and displaying account details.
9. Write a program to show the usage of this keyword in differentiating class variables and parameters.
10. Implement a program that counts the number of words in a sentence using String Tokenizer.

Unit-2: Inheritance & Exceptions


1. Differentiate between method overloading and method overriding.
2. Explain the usage of the super keyword with an example.
3. Write differences between abstract class and interface.
4. List different types of exceptions in Java with examples.
5. Explain the role of the finally block in exception handling.
6. Implement single, multilevel, and hierarchical inheritance using suitable examples.
7. Write a Java program using interfaces to simulate multiple inheritance.
8. Design a Java package student that contains a class Student with details like roll number, name, and
marks. Write a main program to access the package.
9. Implement user-defined exceptions for "Invalid Age" and "Negative Salary".
10. Write a program to demonstrate exception propagation using throw and throws.
Assignment Questions
Module-2

Unit-1: Multithreading & Collection Framework


1. Differentiate between process and thread with examples.
2. List different thread states in Java.
3. Explain the difference between wait() and sleep() methods.
4. Define comparator and comparable. Give differences.
5. Explain the significance of fail-fast iterators in collections.
6. Write a program to create multiple threads using both Thread class and Runnable interface.
7. Implement inter-thread communication for a producer-consumer problem.
8. Write a Java program to simulate a railway ticket booking system using synchronization.
9. Demonstrate sorting of Employee objects based on salary using Comparator and Comparable.
10. Implement a program to store and display student details using HashMap.

Unit-2: Swings
1. List differences between AWT and Swing.
2. Explain the delegation event model in Swing.
3. Write short notes on JRadioButton and JCheckBox.
4. Compare JList and JComboBox with examples.
5. Explain the role of JTabbedPane in GUI design.
6. Create a Swing application with a Login form using JLabel, JTextField, and JPasswordField.
7. Write a program to handle mouse and keyboard events in Swing.
8. Implement a student registration form using JTabbedPane with tabs for personal, academic, and
contact details.
9. Design a calculator GUI using JButton, JTextField, and event handling.
10. Create a mini project in Swing for a Library Management System using JTable and collections.

You might also like