Java Previous Year Question Papers
Java Previous Year Question Papers
Part- A
(25 Marks)
1.a) What is data abstraction? [2M]
b) List string manipulation functions of Java String class. [3M]
c) Differentiate between interface and abstract class. [2M]
d) Explain the use of ‘final’ keyword. [3M]
e) Differentiate between thread and process. [2M]
f) List any six built-in exceptions in Java. [3M]
g) What is the difference between array and vector? [2M]
h) List the byte stream classes. [3M]
i) What are the containers available in swing? [2M]
j) Compare Applets with application programs. [3M]
Part-B
(50 Marks)
OR
7.a) www.ManaResults.co.in
Does Java support thread priorities? Justify your answer with suitable discussion.
b) Describe producer-consumer pattern using inter-thread communication. [5+5]
8.a) Give an account of Random collection class
b) Discuss the methods of Stack class
c) What is the need of Generics? [3+3+4]
OR
9.a) Discuss the four types of JDBC driver with suitable diagrams.
b) Write a JDBC program to update the amount balance in an account after every
withdrawal. Assume the necessary database table. [5+5]
10.a) What is the significance of layout managers? Discuss briefly various layout
managers.
b) Give an overview of JButton class. [5+5]
OR
11.a) Explain delegation event model.
b) Write an Applet to draw a smiley picture accept user name as a parameter and
display welcome message. [5+5]
--ooOoo--
www.ManaResults.co.in
Code No: 114CX R13
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, October/November - 2016
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
PART- A
(25 Marks)
1.a) Define polymorphism. [2]
b) Why is Java known as platform independent? [3]
c) Differentiate between abstract class and interface. [2]
d) How to create and access a package? [3]
e) List the thread states. [2]
f) What keywords are essential in handling user-defined exception? [3]
g) What is the use of String Tokenizer class? [2]
h) Write about the random access file operations. [3]
i) What are the merits of swing components over AWT? [2]
j) What is an adapter class? What is its significance? List the adapter classes. [3]
PART-B
(50 Marks)
2. What are the drawbacks of procedural languages? Explain the need of object
oriented programming with suitable program. [10]
OR
3.a) Does Java support multi way selection statement? Justify your answer.
b) Describe type promotion rules of Java. [5+5]
4.a) Explain multilevel inheritance with the help of abstract class in your program.
b) Can inheritance be applied between interfaces? Justify your answer. [5+5]
OR
5.a) What is meant by dynamic method dispatch? Explain with a program.
b) Illustrate the use of static nested classes. [5+5]
www.ManaResults.co.in
8.a) Differentiate between ArrayList and Vector.
b) List the methods of Stack class. [5+5]
OR
9. Write a JDBC program to search for an attribute in a table and display the entire
tuple to the user. For example, display all the details of the student given his/her
roll number. [10]
10.a) Is Applet more secure than application program? Justify your answer.
b) Design a user interface to collect data from the student for admission application
using swing components. [5+5]
OR
11. Write a program to demonstrate various keyboard events with suitable
functionality. [10]
---ooOoo---
www.ManaResults.co.in
Code No: 114CX R13
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, May - 2016
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
Note: This question paper contains two parts A and B.
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 and may have a, b, c as sub questions.
PART - A (25 Marks)
4.a) Explain the different parameter passing mechanisms used in Java with an
example.
b) Write a runtime polymorphism program in Java by using interface reference
variable. [5+5]
OR
5.a) Design an interface called Shape with methods draw() and getArea(). Further
design two classes called Circle and Rectangle that implements Shape to compute
area of respective shapes. Use appropriate getter and setter methods. Write a java
program for the same.
b) Explain the various access specifiers are used in java. [5+5]
--ooOoo--
www.ManaResults.co.in
Code No: 114CX R13
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, December - 2017
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
PART- A
(25 Marks)
1.a) Define data abstraction. [2]
b) What is the size of char data type? Why does it differ from C language? [3]
c) What is the use of anonymous inner class? [2]
d) What is a package? How to define it and access it? [3]
e) Differentiate between error and exception. [2]
f) How to assign priorities to threads? [3]
g) List the functions of Stack class. [2]
h) What is the need of JDBC type 3, type 4 drivers? [3]
i) What are the sources for item event? [2]
j) Give the hierarchy for swing components. [3]
PART-B
(50 Marks)
2.a) What feature of Java makes it platform independent and portable?
b) Is Java a robust language? Justify your answer. [5+5]
OR
3.a) Differentiate between a class and object.
b) Demonstrate constructor overloading concept. [5+5]
6.a) Write a program to illustrate the use of multiple catch blocks for a try block.
b) What are the uses of ‘throw’ and ‘throws’ clauses for exception handling? [5+5]
OR
7.a) What is the difference between a thread and a process?
b) How to achieve synchronization among threads? Write suitable code. [5+5]
www.ManaResults.co.in
8.a) What is a vector? How does it differ from array, list?
b) Write a program to count number of words in a given sentence. [5+5]
OR
9.a) Write a program to copy the contents of file1 to file 2. Read the names of files as
command line arguments.
b) Write about driver manager class for database connectivity. [5+5]
---ooOoo---
www.ManaResults.co.in
www.ManaResults.co.in
www.ManaResults.co.in
Code No: 114CX R13
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year II Semester Examinations, December - 2018
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
PART- A
(25 Marks)
PART- B
(50 Marks)
2.a) What are the drawbacks of procedural languages? Explain the need of object
oriented programming with suitable program.
b) Discuss the lexical issues of Java. [5+5]
OR
3.a) What are the primitive data types in Java? Write about type conversions.
b) What is a constructor? What is its requirement in programming? Explain with
program. [5+5]
4.a) With suitable code segments illustrate various uses of ‘final’ keyword.
b) Discuss about anonymous inner classes. [5+5]
OR
5. What are the benefits of inheritance? Explain the various forms of inheritance
with suitable code segments. [10]
10.a) What is the role of event listeners in event handling? List the Java event listeners
b) Write an applet to display the mouse cursor position in that applet window.[5+5]
OR
11.a) Discuss various AWT containers with examples.
b) Explain about the adapter class with an example. [5+5]
--ooOoo--
WWW.MANARESULTS.CO.IN