JNTU

JNTU MCA 2023 JAVA PROGRAMMING Previous Question Paper (March - 2023 - R20)

MCA | 2023 | II | R20 | March - 2023

Answer PaperPaper Code: 872AAMaximum 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

Illustrate type conversion and type casting in Java.

5 marks

Answer

Type conversion and type casting are mechanisms in Java to handle the assignment of values between different data types.

Type Conversion (Widening): This occurs automatically when a smaller data type is assigned to a larger data type. It is safe because there is no loss of data. The compiler performs this implicitly.

int i = 100;
long l = i; // Implicit conversion from int to long

Type Casting (Narrowing): This is an explicit process required when assigning a larger data type to a smaller data type. It must be performed manually by the programmer using the cast operator (type) because it may result in data loss or precision reduction.

double d = 9.78;
int i = (int) d; // Explicit casting from double to int, results in 9

The key difference is that widening is automatic and safe, whereas narrowing is explicit and carries the risk of truncation or overflow.

1b

Differentiate between interface and abstract class.

5 marks

Answer

An abstract class is a class that cannot be instantiated and may contain both abstract methods (without bodies) and concrete methods (with implementation). It is used to provide a common base class for subclasses to share code and state. In contrast, an interface is a blueprint of a class that typically contains only abstract methods (prior to Java 8) and constants. It defines a contract that implementing classes must follow.

FeatureAbstract ClassInterface
InheritanceA class can extend only one abstract class.A class can implement multiple interfaces.
MethodsCan have abstract and non-abstract methods.Methods are implicitly public and abstract (default/static allowed since Java 8).
VariablesCan have final, non-final, static, and non-static variables.Variables are implicitly public, static, and final.
Access ModifiersMembers can have any access modifier (private, protected, public).Members are implicitly public.
PurposeUsed for code reuse and defining a base identity.Used to achieve multiple inheritance and define capabilities.
1c

What are the benefits of exception handling?

5 marks

Answer

Sign in to view the complete answer paper.

1d

Discuss the limitations of abstract window toolkit.

5 marks

Answer

Sign in to view the complete answer paper.

1e

How to perform thread synchronization?

5 marks

Answer

Sign in to view the complete answer paper.

Part B

2

Explain the need of object oriented programming paradigm and its concepts.

10 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Demonstrate the use of ‘final’ keyword.

5 marks

Answer

Sign in to view the complete answer paper.

b

With an example, explain the concept of inner classes.

5 marks

Answer

Sign in to view the complete answer paper.

4

Define polymorphism and discuss dynamic method dispatch.

10 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Describe member access rules for packages.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to implement hierarchical inheritance.

5 marks

Answer

Sign in to view the complete answer paper.

6

How to define an interface? Illustrate partial and total implementation of interfaces.

10 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Differentiate between throw and throws usage.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to demonstrate nested by statements.

5 marks

Answer

Sign in to view the complete answer paper.

8

With the help of a program explain delegation event model of Java.

10 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Create a login form using labels, text boxes and buttons.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe Model-view-controller architecture.

5 marks

Answer

Sign in to view the complete answer paper.

10

Discuss the advantages of applets over application program and life cycle of an applet.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

How to create multiple threads?

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain the purpose of wait() and notify() methods.

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 MCA 2023 II, March - 2023, R20.

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