JNTU

JNTU MCA 2022 JAVA PROGRAMMING Previous Question Paper (October/November - 2022 - R20)

MCA | 2022 | II | R20 | October/November - 2022

Answer PaperPaper Code: 872AAMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Explain the basic concepts of object oriented programming.

7 marks

Answer

Object-Oriented Programming (OOP) is a paradigm based on the concept of objects which contain data in the form of fields and code in the form of methods. The core concepts are:

  1. Class: A blueprint or template that defines the properties and behaviors of objects.
  2. Object: An instance of a class with a specific state and behavior.
  3. Encapsulation: The mechanism of wrapping data and code together as a single unit and restricting direct access to some of an object's components.
  4. Abstraction: Hiding complex implementation details and showing only the essential features of an object.
  5. Inheritance: A mechanism where one class acquires the properties and behaviors of another class, promoting code reusability.
  6. Polymorphism: The ability of an object or method to take on many forms, typically achieved through method overloading and overriding.
b

Discuss the scope and life time of the variable in java.

8 marks

Answer

In Java, the scope and lifetime of a variable depend on its declaration:

  1. Instance Variables: Declared inside a class but outside any method. Their scope is the entire class, and their lifetime is tied to the object; they are created when an object is instantiated and destroyed when the object is garbage collected.
  2. Static (Class) Variables: Declared with the static keyword. Their scope is the class, and they exist for the entire duration of the program execution, shared by all instances of the class.
  3. Local Variables: Declared inside a method, constructor, or block. Their scope is limited to the block in which they are defined. Their lifetime begins when the block is entered and ends when the block is exited.
  4. Method Parameters: Act as local variables within the method. Their scope is the method body, and they are destroyed once the method execution completes.
215 marks
a

What is a constructor? What is its requirement in programming? Explain with program.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is a nested class? Differentiate between nested classes and inner classes.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Define a package? How to access and import a package? Explain with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss multilevel inheritance with a sample program.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What is the use of final with inheritance? Explain with an example.

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss in detail the limitations and benefits of inheritance.

7 marks

Answer

Sign in to view the complete answer paper.

5

Explain about exception handling and write a java program which illustrates the try, catch, throw and throws and finally blocks.

15 marks

Answer

Sign in to view the complete answer paper.

6

Design an interface called Shape with methods draw() and getArea(). Further design two classes called Circle and Rectangle that implements Shape to compute area of respective shapes. Use appropriate getter and setter methods. Write a java program for the same.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

What is the role of event listeners in event handling? List the Java event listeners.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain delegation event model.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain the synchronization of multiple threads in Java with an example.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain the concept of applet to applet communication.

7 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 MCA 2022 II, October/November - 2022, R20.

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

Other papers in JAVA PROGRAMMING

Loading Question Papers

Fetching data from database...