JNTU

JNTU B.Tech II JAVA PROGRAMMING Previous Question Paper (September/October - 2023 - R15)

B.Tech | II | II | R15 | September/October - 2023

Answer PaperPaper Code: 124CXMaximum 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

1.a

What is Byte code?

2 marks

Answer

Bytecode is the intermediate, platform-independent representation of Java source code generated by the Java compiler (javac). It is a highly optimized set of instructions designed to be executed by the Java Virtual Machine (JVM) rather than directly by the computer's processor, enabling the 'write once, run anywhere' capability of Java.

1.b

What is the purpose of ‘this’ keyword in java?

3 marks

Answer

The this keyword in Java is a reference variable that refers to the current object instance within a method or constructor. Its primary purposes are as follows:

  • Resolving Shadowing: It is used to distinguish between class instance variables and parameters when they share the same name, typically in constructors or setter methods (e.g., this.x = x).
  • Constructor Chaining: It allows a constructor to call another constructor within the same class using
    this()
    , which must be the first statement in the constructor body.
  • Passing Current Instance: It can be used to pass the current object as an argument to another method or constructor.
  • Returning Current Instance: It can be returned from a method to support method chaining (fluent interface design).
1.c

What is an Inner class?

2 marks

Answer

Sign in to view the complete answer paper.

1.d

Define Abstract class and Abstract method.

3 marks

Answer

Sign in to view the complete answer paper.

1.e

What are the two ways of implementing thread in Java?

2 marks

Answer

Sign in to view the complete answer paper.

1.f

Compare and contrast throw and throws.

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What are the advantages of Collections Framework?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

What is JDBC? List the JDBC components?

3 marks

Answer

Sign in to view the complete answer paper.

1.i

Define Adapter classes.

2 marks

Answer

Sign in to view the complete answer paper.

1.j

What is an Event Listener in java?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Explain any five features of object oriented programming.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a Program to illustrate static variables and static methods.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

What is garbage collection in Java? How it is achieved?

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a Java program to implement constructor overloading.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

What is Method overriding? Write a program to demonstrate method overriding.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is a Package? Write down the steps for creating user defined package.

3 marks

Answer

Sign in to view the complete answer paper.

OR
5

Explain how interface is used to achieve multiple inheritance in Java?

10 marks

Answer

Sign in to view the complete answer paper.

6

What is an exception? Write a program to accept a password from user and throw “Authentication Denied” exception if the password is incorrect.

10 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Explain with a neat diagram the life cycle of a thread.

5 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between an error and an exception. Give examples for the same.

5 marks

Answer

Sign in to view the complete answer paper.

8

Explain JDBC type 1 to type 4 drivers.

10 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

What is a stream? Explain Byte Stream and Character Stream.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is the use of ArrayList class? Describe any two methods of Array List class.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Write a java Program to handle various keyboard events.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain the lifecycle of an applet.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Compare and contrast Swing and Abstract Window Toolkit (AWT) in Java.

5 marks

Answer

Sign in to view the complete answer paper.

b

Briefly explain Delegation Event Model.

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 IT II II, September/October - 2023, R15.

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