Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech II OBJECT ORIENTED PROGRAMMING THROUGH JAVA Previous Question Paper (April/May - 2023 - R16)
i) Question paper consists of Part A, Part B.
ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions.
iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
PART - A
What is an Object? How to allocate memory for objects?
Answer
An object is a real-world entity that has state (data) and behavior (methods). Memory is allocated for objects on the heap using the new keyword, which dynamically allocates memory at runtime and returns a reference to that memory location.
Explain why Java is Machine Independent.
Answer
Java is machine-independent because it compiles source code into Bytecode, an intermediate representation. This bytecode is executed by the Java Virtual Machine (JVM), which acts as a platform-specific interpreter or JIT compiler, allowing the same compiled code to run on any device with a compatible JVM.
Compare interface and abstract class.
Answer
Sign in to view the complete answer paper.
What is a package? How to define it and access it?
Answer
Sign in to view the complete answer paper.
How does Java support inter thread communication?
Answer
Sign in to view the complete answer paper.
What keywords are essential in handling user-defined exception?
Answer
Sign in to view the complete answer paper.
What is tree set class?
Answer
Sign in to view the complete answer paper.
What is the use of Iterator class?
Answer
Sign in to view the complete answer paper.
Explain about JCombo box.
Answer
Sign in to view the complete answer paper.
Give an overview of JButton class.
Answer
Sign in to view the complete answer paper.
PART - B
Discuss the drawbacks of procedural languages and explain the need of object oriented programming with suitable program.
Answer
Sign in to view the complete answer paper.
Explain the importance of constructor.
Answer
Sign in to view the complete answer paper.
Is Java a robust language? Justify your answer.
Answer
Sign in to view the complete answer paper.
Identify the relationship between classes and interfaces.
Answer
Sign in to view the complete answer paper.
Distinguish between byte streams and character streams.
Answer
Sign in to view the complete answer paper.
Discuss how to define and import a package? Explain with an example.
Answer
Sign in to view the complete answer paper.
What is auto boxing? Explain.
Answer
Sign in to view the complete answer paper.
Describe producer-consumer pattern using inter-thread communication
Answer
Sign in to view the complete answer paper.
Explain the concept of java built in exceptions with an example.
Answer
Sign in to view the complete answer paper.
What is meant by re-throwing exception? Discuss a suitable scenario for this.
Answer
Sign in to view the complete answer paper.
Write a program that demonstrate the priority setting in threads.
Answer
Sign in to view the complete answer paper.
Write a program to store the names of bank depositors and their current balances by using hash table.
Answer
Sign in to view the complete answer paper.
Explain the implementation of priority queue in java.
Answer
Sign in to view the complete answer paper.
Write a program which stores a list of strings in an Array List and then displays the contents of the list.
Answer
Sign in to view the complete answer paper.
Explain various interfaces used in Collection framework?
Answer
Sign in to view the complete answer paper.
Explain procedure to handle mouse events in Java with an example program.
Answer
Sign in to view the complete answer paper.
Illustrate in detail about the various layout managers used in Java?
Answer
Sign in to view the complete answer paper.
Write a java program to design a scientific calculator using AWT.
Answer
Sign in to view the complete answer paper.
Describe in detail about the various event listener interfaces.
Answer
Sign in to view the complete answer paper.