OBJECT ORIENTED PROGRAMMING USING JAVA
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Which of the following is not a core feature of Object-Oriented Programming?
What is the main purpose of a class in Java?
Which access modifier provides the highest visibility in Java?
Method overloading is an example of
Method overriding demonstrates
Which of the following is used to achieve 100% abstraction in Java?
A class can implement
The Object class is
Which keyword is used to import a package?
String class in Java is
Explain the different types of access modifiers available in Java and describe their visibility scopes with suitable examples.
Explain the difference between procedural programming and object-oriented programming paradigms. Why is Java considered an object-oriented language?
Describe the concept of method overloading and method overriding with the help of suitable examples from Java.
Explain the difference between an interface and an abstract class. How does Java support multiple inheritance using interfaces?
Describe the exception hierarchy in Java. Differentiate between checked and unchecked exceptions with examples.
Write a complete Java program to demonstrate the use of constructors (default, parameterized, copy), method overloading, and the ‘this’ keyword.
Write a Java program to handle multiple exceptions using nested try-catch blocks and the finally clause. Include re-throwing of exceptions.
Write a JDBC program to connect to a database, insert a record into a “Student” table, and retrieve all records using the Collections Framework (ArrayList) to store the results.
Compare and contrast inheritance hierarchies with interface implementation. Analyze when you would prefer interfaces over abstract classes in a Java project.
Evaluate the impact of garbage collection and the finalize() method on Java program performance. Is it advisable to rely on finalize() for resource cleanup? Justify your answer.
“Multithreading improves performance but introduces complexity.” Critically evaluate this statement with reference to thread synchronization, priorities, and inter-thread communication.
Explain the key features of Object-Oriented Programming and describe how each feature provides advantages over procedural programming.
What is the purpose of break and continue statements in loops? Explain with examples.
Write a Java program to print all odd numbers between 1 to 50 using a while loop.
History of java
Concept of Packages in Java
Polymorphism
Multiple inheritance
