0% found this document useful (0 votes)
1K views12 pages

Java Previous Year Question Papers

This document appears to be an exam paper for a Java Programming course, containing instructions, questions, and content related to Java concepts and programming. 1. The document is divided into two parts - Part A contains 10 short answer questions worth 25 marks total, and Part B contains 5 sections with 2 questions each worth 10 marks each, for a total of 50 marks. 2. The questions in Part A cover a range of Java topics including control statements, type casting, inheritance, multithreading, exceptions, data structures, layout managers, and applets. 3. The questions in Part B involve longer explanations and programs related to object oriented programming, control statements, inheritance, exceptions, threading, collections, databases

Uploaded by

MEGHANA 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views12 pages

Java Previous Year Question Papers

This document appears to be an exam paper for a Java Programming course, containing instructions, questions, and content related to Java concepts and programming. 1. The document is divided into two parts - Part A contains 10 short answer questions worth 25 marks total, and Part B contains 5 sections with 2 questions each worth 10 marks each, for a total of 50 marks. 2. The questions in Part A cover a range of Java topics including control statements, type casting, inheritance, multithreading, exceptions, data structures, layout managers, and applets. 3. The questions in Part B involve longer explanations and programs related to object oriented programming, control statements, inheritance, exceptions, threading, collections, databases

Uploaded by

MEGHANA 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Code No: 114CX R13

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD


B.Tech II Year II Semester Examinations, May-2015
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)
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)

2.a) Explain the basic concepts of object oriented programming.


b) What is the usage of enumerated data type? Give examples. [5+5]
OR
3.a) Discuss Java jump statements.
b) Write about garbage collection in Java.
c) Explain the use of ‘this’ keyword. [3+3+4]

4.a) Explain method overriding with a suitable example program.


b) With suitable program segments describe the usage of ‘super’ keyword. [5+5]
OR
5.a) What is a nested class? Differentiate between static nested classes and non-static
nested classes.
b) How to define a package? How to access, import a package? Explain with
examples. [5+5]

6.a) With a suitable Java program explain user-defined exception handling.


b) What is meant by re-throwing exception? Discuss a suitable scenario for this. [5+5]

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

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)
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]

6. What is an exception? How are exceptions handled in Java programming?


Explain with suitable program. [10]
OR
7. Describe the need of thread synchronization. How is it achieved in Java
programming? Explain with a suitable program. [10]

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)

1.a) Differentiate between break and continue statement. [2]


b) What is type casting? Explain with an example. [3]
c) What is the use of super keyword? [2]
d) Distinguish between abstract class and concrete class. [3]
e) What are the advantages of multithreading? [2]
f) Explain the types of exceptions. [3]
g) List the hash table constructors. [2]
h) Explain the methods defined by Vector. [3]
i) Explain the use of layout managers. [2]
j) Explain the life cycle of an applet. [3]

PART - B (50 Marks)

2.a) Write a java program to find the factorial of a given number.


b) Explain the different types of constructors with an example. [5+5]
OR
3.a) Write a program to find the transpose of a given matrix.
b) Explain the scope and life time of the variable. [5+5]

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]

6.a) Write a program that demonstrate the priority setting in threads.


b) Write a program that includes a try block and a catch clause which processes the
arithmetic exception generated by division-by-zero error. [5+5]
OR
7.a) Write a program that creates a thread that forces preemptive scheduling for lower-
priority threads.
b) www.ManaResults.co.in
Explain the checked and unchecked exception with an example. [5+5]
8.a) Explain the types of drivers used in JDBC.
b) Write a program to implement the operations of random access file. [5+5]
OR
9.a) Explain the file management using File class.
b) Write a program which stores a list of strings in an ArrayList and then displays
the contents of the list. [5+5]

10.a) Describe about various components in AWT.


b) Write an applet program to handle all mouse events. [5+5]
OR
11.a) Write a Java program to create AWT radio buttons using check box group.
b) Explain the various event listener interfaces. [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

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)
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]

4. What is inheritance? Explain different forms of inheritance with suitable program


segments and real world example classes. [10]
OR
5.a) Differentiate between interface and abstract class.
b) What is meant by dynamic method dispatch? [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]

10.a) Why swing components are preferred over AWT components?


b) What is an adapter class? What is their role in event handling? [5+5]
OR
11.a) Explain the life cycle of an applet.
b) What are the various layout managers used in Java? [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

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)

1.a) What is the significance of Java’s byte code? [2]


b) List the applications of object oriented programming. [3]
c) Differentiate class, abstract class and interface. [2]
d) How to create and use a package in Java program? [3]
e) How does Java support inter thread communication? [2]
f) List any four unchecked exception. [3]
g) What is the use of Iterator class? [2]
h) Compare byte streams with character streams. [3]
i) Give the subclasses of JButton class. [2]
j) Differentiate between grid layout and border layout managers. [3]

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]

6.a) With a program illustrate user defined exception handling


b) How to handle multiple catch blocks for a nested try block? Explain with an
example. [5+5]
OR
7.a) Describe how to create a thread with an example.
b)
WWW.MANARESULTS.CO.IN
Write a program to explain thread priorities usage. [5+5]
8. What support is provided by File class for file management? Illustrate with
suitable scenarios. [10]
OR
9.a) Describe different types of JDBC drivers.
b) Explain the random access file operations with a suitable program. [5+5]

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

You might also like