JNTU

JNTU B.Tech II JAVA PROGRAMMING Previous Question Paper (April/May - 2023 - R13)

B.Tech | II | II | R13 | April/May - 2023

Answer PaperPaper Code: 114CXMaximum Marks: 75Time: 3 Hours

Note: 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

1a

What is Default Constructor and Parameterized constructor?

2 marks

Answer

A Default Constructor is a constructor that takes no arguments. If a class does not explicitly define any constructor, the Java compiler automatically provides a no-argument default constructor to initialize object members to their default values (e.g., 0, null, or false).

A Parameterized Constructor is a constructor that accepts one or more arguments. It is used to provide different values to distinct objects at the time of their creation, allowing for custom initialization of instance variables.

1b

List the different ways to read input from console in java.

3 marks

Answer

There are three primary ways to read input from the console in Java:

  1. Scanner Class: Part of the java.util package, this is the most common and easiest way to read primitive types and strings using regular expressions. It provides methods like nextInt(), nextDouble(), and nextLine().
  2. BufferedReader Class: Found in the java.io package, this is used with an InputStreamReader. It reads data as a stream of characters and is generally faster than Scanner because it buffers the input, though it requires manual parsing of data types.
  3. Console Class: Introduced in Java 6, the java.io.Console class is specifically designed for console-based applications. It provides methods like readLine() and readPassword(), the latter of which allows for secure input by not echoing characters to the screen.
1c

What is an anonymous inner class?

2 marks

Answer

Sign in to view the complete answer paper.

1d

What are the member access rules?

3 marks

Answer

Sign in to view the complete answer paper.

1e

What is exception?

2 marks

Answer

Sign in to view the complete answer paper.

1f

What is the difference between thread and process?

3 marks

Answer

Sign in to view the complete answer paper.

1g

What is Hash table in java?

2 marks

Answer

Sign in to view the complete answer paper.

1h

Define stream. List types of streams.

3 marks

Answer

Sign in to view the complete answer paper.

1i

What is an applet?

2 marks

Answer

Sign in to view the complete answer paper.

1j

Define Event, Panel and container.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Explain the features of Java.

7 marks

Answer

Sign in to view the complete answer paper.

b

What are static variables and static methods?

3 marks

Answer

Sign in to view the complete answer paper.

OR
3

Define Constructor. What is constructor overloading? Write a program to illustrate the same.

10 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain the process of creating and accessing packages with suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain abstract class with an example and compare with interface

5 marks

Answer

Sign in to view the complete answer paper.

OR
5

Explain inheritance and its types? How runtime polymorphism can be achieved using inheritance, explain with a suitable program?

10 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Write a program using try and catch block to check whether the given array size is negative or not.

5 marks

Answer

Sign in to view the complete answer paper.

b

Define and differentiate multiprocessing and multithreading.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Differentiate between throw and throws. Give example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain thread synchronization briefly.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

What is an Iterator class? Describe any two methods of Iterator class example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write Java JDBC program that update the records in a Student table in Database containing the fields Roll Number (Integer), Name (String), Branch (String), Percentage (Float) based on Roll Number (Integer).

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Write a Java program to read a text file then count and display no. of lines, words in it.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a short note on String Tokenizer.

5 marks

Answer

Sign in to view the complete answer paper.

10

How to pass parameters to an applet? Write an applet to accept Account number and balance in the form of parameter and print message “low balance” if balance is less than 500.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Write a swing application which uses JTabbed Pane and JPanel.

5 marks

Answer

Sign in to view the complete answer paper.

b

How Event handling is done in java?

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of JAVA PROGRAMMING from JNTU for B.Tech CSE II II, April/May - 2023, R13.

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...