JAVA Previous Question Papers Jntuh r18
JAVA Previous Question Papers Jntuh r18
8.a) Write code to create an Applet drawing a smiley face using graphics class.
02
b) Explain model-view-controller architecture for application development. [8+7]
2
---oo0oo---
R18
U
Code No: 156CC
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
SE
B. Tech III Year II Semester Examinations, August/September - 2021
OBJECT ORIENTED PROGRAMMING THROUGH JAVA
(Common to ECE, EIE)
Time: 3 Hours Max. Marks: 75
Answer any five questions
D
All questions carry equal marks
---
PA
1.a) Explain features of object oriented programming languages.
b) Discuss the different levels of accesses protection available in Java with examples.
[7+8]
PE
2.a) Explain parameter passing mechanism in Java.
b) Explain briefly about String class and discuss various methods in string class with an
example. [7+8]
R
3.a) What is package? Explain the process of defining and creating a package with suitable
examples
SA
b) What is interface? How to implement interface in Java? [8+7]
PART – B
pe
(50 Marks)
6. How are exceptions handled in Java programming? Demonstrate with suitable code
segments. [10]
OR
7.a) Discuss the built-in functions used in inter thread communication.
b) Write a Java program to count number of words in a given sentence. [5+5]
8.a) Briefly explain event delegation model.
b) Discuss any three listener interfaces frequently used in event handling. [5+5]
OR
JN
9. Construct an user interface form for student registration to a hackathon using AWT
components and event handling concept. [10]
1.a) What is method overloading? Define two methods that have same name but different
pe
parameter types. Define two methods in class that have identical method names and
parameter profile with different return value types or different modifier.
b) What is an array? Write a program that creates and initializes a four integer elements
rf
array. Find the sum and average of its value. [8+7]
3.a) Explain the process of defining and creating a package with suitable examples.
b) Define an interface in java. How are interfaces implemented? How they can be accessed?
/m
[8+7]
4.a) Explain the types of Access specifiers are used in Java and also illustrate with an
ar
example.
b) What is the use of super and final? [7+8]
-2
5.a) What is an Exception? List out the keywords for exception handling and write steps to
develop user defined exception.
0
b) Write a program that counts number of characters, words, and lines in a file. Use
exceptions to check whether the file that is read exists or not. [7+8]
22
6.a) What is multithreading? What are the priorities given for multithreading? Explain
advantages of multithreading.
b) Describe the complete life cycle of a thread with an example. [8+7]
jn
7.a) Write short notes on event, event source and event listeners.
b) Explain about layout manager and different layouts and write an example program to
tu
demonstrate layouts. [7+8]
h
8.a) How to create an applet? Explain with an example.
b) Explain MVC Architecture in detail. [8+7]
---ooOoo---