Java PreviousPapers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

N

Code No: 154BE R18


JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
TU
B. Tech II Year II Semester Examinations, November/December - 2020
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 2 Hours Max. Marks: 75
H
Answer any Five Questions
All Questions Carry Equal Marks
---
U
1. Illustrate constructor overloading concept with an example. [15]
se
2. Define a package. How to import packages? Explain with illustrations. [15]

3. How to create multiple threads in a program? Explain with an example. [15]


d
4. Write a program to read content of a file, split the sentences into words and count
Pa
number of occurrences of ‘is’ in the given text. [15]

5. Create a user interface to collect data from customer for opening an account in a bank.
Use all possible swing components and layout manager for your interface design. [15]
pe
6. Demonstrate various forms of inheritance with suitable program segments. [15]
r2
7. Write a program to copy two files into a target file. [15]

8. Explain how to create your own exception in Java program with an example? [15]
8-
---ooOoo---
11
-2
02
0 PM
Code No: 154BE R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B. Tech II Year II Semester Examinations, July/August - 2021
JAVA PROGRAMMING
JN
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
Answer any five questions
TU
All questions carry equal marks
---

1.a) List and explain the Java buzzwords in detail.


b) Support the statement “java byte code gives high performance”. Discuss. [7+8]
H
2.a) Explain how Packages are created and accessed.
b) Discuss the Random access file operations. [8+7]
U
3.a) Explain the Java thread model. Illustrate with an example.
se
b) List the benefits of multi-threaded programming. Write a program for multi threading.
[7+8]
d
4.a) Explain the benefits of the Java collections framework.
b) Write a short note on String Tokenizer and collection interface. [8+7]
31
5.a) What is GUI? Explain the steps to build GUI.
b) Enumerate the life cycle of an applet in detail. [8+7]
-0
6.a) What is an exception? How is it different from an error? Illustrate briefly the usage of
five keywords in exception handling.
b) Give a brief note on the Stream classes. [10+5]
7-
7. Illustrate about various levels of protection provided to the variables or methods within
classes, subclasses and packages in java. [15]
21
8.a) What is a Swing? Explain the Component Hierarchy of Swings.
b) How the events of the mouse and keyboard can be handled? Explain with an example.
[8+7]
AM
---ooOoo---
Code No: 154BE R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B. Tech II Year II Semester (Special) Examinations, January/February - 2021
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 2 Hours Max. Marks: 75
Answer any Five Questions
All Questions Carry Equal Marks
JN
---

1.a) What features of Java makes it a robust language?


TU
b) How to instantiate a class in Java program? [8+7]

2. What is interface? Explain how to implement the interface in Java. [15]


H
3. Write a Java program to handle producer-consumer problem using inter thread
communication mechanism. [15]

4.a) Write a program to convert an ArrayList into an array.


SS
b) Illustrate the applications of Map, HashMap utilities. [9+6]

5. Describe in detail model-view-controller architecture. [15]

6. Write a Java program to create multilevel and hierarchical inheritance. [15]


Fe
7. Explain about Random access file operations with an example. [15]
b
8. Explain about the different types of exceptions used in Java. [15]
20
---ooOoo---
21
Code No: 154BE R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JN
B. Tech II Year II Semester Examinations, August/September - 2021
JAVA PROGRAMMING
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
TU
Answer any five questions
All questions carry equal marks
---
H
1.a) Analyze the characteristics of object oriented programming concepts?
b) With suitable program segments examine the usage of „super‟ keyword. [8+7]
us
2.a) Does Java support multi way selection statement? Justify your answer.
b) Generate different forms of inheritance with suitable program segments and real world
example classes. [7+8]
ed
3.a) Demonstrate about Reading console Input and Writing Console Output.
b) Explain nested interface with example. [7+8]
pa
4.a) What is java package? What is CLASSPATH? Show how to create and access a java
package with an example.
b) Create an interface with at least one method and implement that interface. [7+8]
pe
5.a) What is meant by re-throwing exception? Demonstrate with a suitable scenario for this.
b) Write a program that creates a thread that forces pre-emptive scheduling for lower
rs
priority threads. [7+8]

6.a) Summarize the differences between thread-based multitasking and process-based


multitasking.
Se
b) Write a program to illustrate user defined exception that checks the internal and
external marks if the internal marks are greater than 40 it raise the exception “internal
marks are exceed”, if the external marks are greater than 60 exception is raised and
display the message the “external marks are exceed.” [7+8]
p2
7.a) Develop a program to read a file content and extract words using String Tokenized
class. Display the file if it contains the user query term/search key.
02
b) Judge the purpose of Stack class. [8+7]

8.a) Design a user interface to collect data from the student for admission application using
1
swing components.
b) What is an adapter class? Demonstrate its role in event handling. [8+7]

---ooOoo---

You might also like