Object-Oriented Programming With Java
Object-Oriented Programming With Java
**Time:** 3 Hours
**Maximum Marks:** 70
### **Instructions:**
---
---
---
1. Write a Java program to create a class called `Employee` with attributes and
methods. Include constructor, setters/getters, and a method to display employee
details.
2. Explain **polymorphism** with both compile-time and run-time examples in Java.
3. What is a package in Java? Create a user-defined package with classes and
explain how to import and use it.
4. Write a Java program that reads input from a file and counts the number of words
using `FileReader` and `BufferedReader`.
5. Explain **multithreading** in Java. Write a program that creates two threads and
executes them concurrently.
6. Describe **Java Collection Framework**. Write a program using `ArrayList` to
store and display student names.
---