JNTUH

JNTUH B.Tech III JAVA PROGRAMMING Previous Question Paper (February - 2023 - R16)

B.Tech | III | II | R16 | February - 2023

Answer PaperPaper Code: 136FMMaximum Marks: 75Time: 3 Hours

i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

125 marks
a

If all objects of a class need to share the same variable, how must you declare that variable?

2 marks

Answer

To share a variable among all objects of a class, you must declare it using the static keyword. A static variable belongs to the class itself rather than any individual instance, ensuring only one copy exists in memory.

b

What is the difference between call-by-value and call-by-reference?

3 marks

Answer

In call-by-value, a copy of the actual parameter's value is passed to the method; changes made to the parameter inside the method do not affect the original variable. In call-by-reference (or passing object references in Java), the memory address of the object is passed, allowing the method to modify the state of the original object.

c

How does a subclass constructor execute its superclass’s constructor?

2 marks

Answer

Sign in to view the complete answer paper.

d

How many classes can implement an interface? How many interfaces can a class implement?

3 marks

Answer

Sign in to view the complete answer paper.

e

What is the purpose of the run( ) method defined by Runnable?

2 marks

Answer

Sign in to view the complete answer paper.

f

How do you restrict access to an object to one thread at a time?

3 marks

Answer

Sign in to view the complete answer paper.

g

What are the types of JDBC drivers?

2 marks

Answer

Sign in to view the complete answer paper.

h

Distinguish between text files and binary files.

3 marks

Answer

Sign in to view the complete answer paper.

i

Discuss on hierarchy of swing components.

2 marks

Answer

Sign in to view the complete answer paper.

j

Mention the relationship between event sources and event sources and event listeners.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

What is garbage collection, and how does it work? What is finalize( )?

5 marks

Answer

Sign in to view the complete answer paper.

b

Develop a Java program that sorts an array of strings by their lengths (instead of sorting them alphabetically).

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Write a Java program that creates a “triangular” two-dimensional array A of 10 rows. The first row has length 1, the second row has length 2, the third row has length 3, and so on. Then initialize the array using nested for loops so that the value of A[i][j] is i+j. Finally, print out the array in a nice triangular form.

5 marks

Answer

Sign in to view the complete answer paper.

b

Mention the operators hierarchy in Java.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain how inheritance, method overriding, and abstract classes are used to support polymorphism.

5 marks

Answer

Sign in to view the complete answer paper.

b

Implement queue data structure using interfaces.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

What are anonymous inner class? Give an example program.

5 marks

Answer

Sign in to view the complete answer paper.

b

Present a brief note on abstract classes and methods.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Write a program using the synchronized Statement.

5 marks

Answer

Sign in to view the complete answer paper.

b

Illustrate throws keyword with a program.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Discuss on thread priorities.

5 marks

Answer

Sign in to view the complete answer paper.

b

How to create your own exceptions. Illustrate with an example.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

How to perform input and output operation on a text file.

5 marks

Answer

Sign in to view the complete answer paper.

b

How to use enumerator and iterator to cycle through the elements of a collection object?

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Describe the random access file operations.

5 marks

Answer

Sign in to view the complete answer paper.

b

Enumerate the steps used to connect to database using JDBC.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Design an application that handles the button click event.

5 marks

Answer

Sign in to view the complete answer paper.

b

How to pass parameters to applets? Illustrate using Java Code.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

What is the importance of adapter classes and list out the event listeners and the corresponding adapter classes?

5 marks

Answer

Sign in to view the complete answer paper.

b

List out the security issues of applets?

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of JAVA PROGRAMMING from JNTUH for B.Tech CE III II, February - 2023, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in JAVA PROGRAMMING

Loading Question Papers

Fetching data from database...