JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II JAVA PROGRAMMING Previous Question Paper (July/August - 2021 - R15)
Answer any Five Questions
All Questions Carry Equal Marks
Main
List and explain various features of Object Oriented Programming paradigm.
Answer
Object-Oriented Programming (OOP) is a paradigm based on the concept of objects that contain data and code. The key features are:
- Classes and Objects: A class is a blueprint for creating objects, while an object is an instance of a class containing state and behavior.
- Encapsulation: The mechanism of wrapping data (variables) and code (methods) together as a single unit, restricting direct access to some of an object's components.
- Abstraction: The process of hiding complex implementation details and showing only the essential features of an object to the user.
- Inheritance: A mechanism where one class acquires the properties and behaviors of another class, promoting code reusability.
- Polymorphism: The ability of an object to take on many forms, achieved through method overloading (compile-time) and method overriding (runtime).
Explain various access modifiers (private, public, protected and default) used in JAVA.
Answer
Access modifiers in Java define the scope and visibility of classes, methods, and variables. They are as follows:
- Private: The access level is limited to the class only. Members marked private cannot be accessed from outside the class.
- Default (No modifier): Access is restricted to the package level. If no modifier is specified, the member is visible only to other classes within the same package.
- Protected: Access is available within the same package and by subclasses in different packages. It allows controlled inheritance of members.
- Public: The access level is global. Members marked public can be accessed from any other class in the application, regardless of the package.
Illustrate method overloading with an example JAVA program.
Answer
Sign in to view the complete answer paper.
Give the syntax of various control statements used in Java programs and explain them.
Answer
Sign in to view the complete answer paper.
What is dynamic binding? How it differs from static binding?
Answer
Sign in to view the complete answer paper.
Explain how JAVA implements run-time polymorphism.
Answer
Sign in to view the complete answer paper.
How to create and access packages in JAVA? Illustrate briefly.
Answer
Sign in to view the complete answer paper.
Explain nested interfaces with an example JAVA program.
Answer
Sign in to view the complete answer paper.
Demonstrate exception handling mechanism with ‘try-catch-finally’ blocks with an example JAVA program.
Answer
Sign in to view the complete answer paper.
Describe the process of connecting to database using JDBC with an illustrative program in JAVA.
Answer
Sign in to view the complete answer paper.
State the differences between a byte stream and a character stream.
Answer
Sign in to view the complete answer paper.
Write a program to list all the files and directories contained in a directory given as the command line argument.
Answer
Sign in to view the complete answer paper.
What is Layout manager? Discuss different types of layout managers used in JAVA with demonstration.
Answer
Sign in to view the complete answer paper.