JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II OBJECT ORIENTED PROGRAMMING THROUGH JAVA Previous Question Paper (November/December - 2018 - R16)
Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks.
Part A
What is inheritance? Give example.
Answer
Inheritance is a mechanism in Java where one class acquires the properties and behaviors of another class, promoting code reusability. For example, if class Animal has a method eat(), a subclass Dog can inherit this method using the extends keyword.
Define the basic characteristics of object oriented programming.
Answer
The basic characteristics of Object-Oriented Programming are:
- Encapsulation: Wrapping data and methods into a single unit to restrict direct access.
- Inheritance: Deriving new classes from existing ones to reuse code.
- Polymorphism: Allowing objects to take many forms, typically through method overloading and overriding.
- Abstraction: Hiding complex implementation details and showing only essential features.
What is Console class? What is its use in java?
Answer
Sign in to view the complete answer paper.
What is the use of auto boxing in java? Explain.
Answer
Sign in to view the complete answer paper.
What is thread based preemptive multitasking?
Answer
Sign in to view the complete answer paper.
How do we set priorities for threads?
Answer
Sign in to view the complete answer paper.
What is a Java Priority queue?
Answer
Sign in to view the complete answer paper.
What is a Collection Class? Give an example.
Answer
Sign in to view the complete answer paper.
What is Swing in Java? How it differs from Applet.
Answer
Sign in to view the complete answer paper.
How do applets differ from application program?
Answer
Sign in to view the complete answer paper.
Part B
Describe the structure of a typical Java program with an example.
Answer
Sign in to view the complete answer paper.
Write the significance of Java Virtual Machine.
Answer
Sign in to view the complete answer paper.
How do we implement polymorphism in JAVA? Explain briefly.
Answer
Sign in to view the complete answer paper.
What is an array? How do you declare the array in java? Give examples.
Answer
Sign in to view the complete answer paper.
How to design and implement an interface in Java? Give an example.
Answer
Sign in to view the complete answer paper.
Give an example where interface can be used to support multiple inheritance.
Answer
Sign in to view the complete answer paper.
What are the methods available in the Character Streams? Discuss.
Answer
Sign in to view the complete answer paper.
Distinguish between Byte Stream Classes and Character Stream Classes.
Answer
Sign in to view the complete answer paper.
What is an Exception? How is an Exception handled in JAVA?
Answer
Sign in to view the complete answer paper.
Write a java program that illustrates the application of multiple catch statements.
Answer
Sign in to view the complete answer paper.
Differentiate between multiprocessing and multithreading. What is to be done to implement these in a program?
Answer
Sign in to view the complete answer paper.
Write a program that creates two threads. Fist thread prints the numbers from 1 to 100 and the other thread prints the numbers from 100 to 1.
Answer
Sign in to view the complete answer paper.
What are similarities and difference between ArrayList and Vector? Explain.
Answer
Sign in to view the complete answer paper.
What is different between Iterator and ListIterator? Explain different ways to iterate over a list.
Answer
Sign in to view the complete answer paper.
What are the best practices related to Java Collections Framework? Discuss.
Answer
Sign in to view the complete answer paper.
What is Comparable and Comparator interface? Differentiate between them.
Answer
Sign in to view the complete answer paper.
What is the difference between init( ) and start ( ) methods in an Applet? When will each be executed?
Answer
Sign in to view the complete answer paper.
Write the applets to draw the Cube and Circle shapes.
Answer
Sign in to view the complete answer paper.
Explain various layout managers in JAVA.
Answer
Sign in to view the complete answer paper.
Write a program to create a frame window that responds to mouse clicks.
Answer
Sign in to view the complete answer paper.