JNTU

JNTU B.Tech III JAVA PROGRAMMING Previous Question Paper (August/September - 2024 - R16)

B.Tech | III | II | R16 | August/September - 2024

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

1.a

Write the drawbacks of Arrays in Java.

2 marks

Answer

The primary drawbacks of arrays in Java are as follows:

  • Fixed Size: Arrays have a static size defined at the time of creation, making it impossible to increase or decrease their capacity dynamically during runtime.
  • Homogeneous Data: Arrays can only store elements of the same data type, which limits their flexibility when handling diverse data structures.
  • Memory Inefficiency: If the allocated size is larger than the actual number of elements stored, memory is wasted; conversely, if the array is full, resizing requires creating a new, larger array and copying all existing elements, which is computationally expensive.
1.b

What is Encapsulation? Explain.

3 marks

Answer

Encapsulation is a fundamental principle of object-oriented programming that involves bundling data (variables) and the methods that operate on that data into a single unit, known as a class. It restricts direct access to some of an object's components, which is a technique used to prevent accidental interference and misuse of data.

Key aspects of encapsulation include:

  • Data Hiding: By declaring class variables as private, the internal state of an object is hidden from the outside world.
  • Controlled Access: Access to private data is provided through public getter and setter methods, allowing the class to validate or filter data before updating it.
  • Maintainability: Encapsulation makes code easier to maintain and modify because the internal implementation details can be changed without affecting other parts of the program that use the class.
1.c

Where do you use Abstract classes?

2 marks

Answer

Sign in to view the complete answer paper.

1.d

How the packages are created and accessed in Java? Explain.

3 marks

Answer

Sign in to view the complete answer paper.

1.e

Differentiate Checked and Unchecked Exceptions.

2 marks

Answer

Sign in to view the complete answer paper.

1.f

What is thread interruption in Java? List 3 methods in Java for interrupting a thread.

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What are Byte and Character Streams in Java?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

Write the uses of Scanner and String Tokenizer classes in Java.

3 marks

Answer

Sign in to view the complete answer paper.

1.i

Explain Security issues with applets.

2 marks

Answer

Sign in to view the complete answer paper.

1.j

What is Delegation Event Model?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Write the usage of Break and Continue statements in loops.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program to find factorial of a given number.

6 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Write about various types of Constructors in Java.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program to implement an enum called "Direction" with constants representing the cardinal directions (North, South, East, West).

6 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

How do you implement Multilevel and Hybrid Inheritance in Java? Give examples.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program to create a class known as "BankAccount" with methods called deposit() and withdraw(). Create a subclass called SavingsAccount that overrides the withdraw() method to prevent withdrawals if the account balance falls below five hundred.

6 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

What are Static inner classes? Explain with an example.

4 marks

Answer

Sign in to view the complete answer paper.

b

What is Dynamic binding? How to implement in Java? Explain.

6 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

How to create and use User defined exceptions in Java? Explain in detail.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program that reads a list of numbers from a file and throws an exception if any of the numbers are negative.

6 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

How thread priories impact the flow of multi-threading program execution in Java? Explain with a suitable example.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program that creates two threads to find and print even and odd numbers from 1 to 20.

6 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

What is the use of Hash table? How to implement it in Java.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is Vector? How to create and access it in Java.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Write the steps in connecting a database in Java.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program to find the longest word in a text file.

6 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Describe the relationship between Event sources and Listeners.

4 marks

Answer

Sign in to view the complete answer paper.

b

Explain Mouse event handling process.

6 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Discuss the life Cycle of an Applet? What are the differences between applets and applications.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write the syntax for JLabel, JTextArea and JButton Swing components.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of JAVA PROGRAMMING from JNTU for B.Tech CE III II, August/September - 2024, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in JAVA PROGRAMMING

Loading Question Papers

Fetching data from database...