JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA JAVA PROGRAMMING Previous Question Paper (March/April - 2022 - R13)

MCA | III | R13 | March/April - 2022

Answer PaperPaper Code: 813AQMaximum Marks: 60Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

112 marks
a

Explain constructor overloading with an example.

6 marks

Answer

Constructor overloading is a technique in Java that allows a class to have multiple constructors with different parameter lists. The compiler differentiates these constructors based on the number, type, and order of the parameters provided during object creation. This provides flexibility in initializing objects with different sets of data.

Example:

class Student {
    String name;
    int age;

    // Constructor with no arguments
    Student() {
        name = "Unknown";
        age = 0;
    }

    // Constructor with two arguments
    Student(String n, int a) {
        name = n;
        age = a;
    }
}
b

What is auto boxing in java? Explain with an example.

6 marks

Answer

Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes (e.g., converting an int to an Integer). This process simplifies code by allowing developers to use primitive values where an object is expected, such as in collections.

Example:

// Autoboxing: primitive int assigned to Integer object
Integer num = 10;

// Using in a collection
java.util.ArrayList<Integer> list = new java.util.ArrayList<>();
list.add(25); // The primitive 25 is automatically boxed into an Integer object
212 marks
a

Discuss about polymorphism with an example program.

6 marks

Answer

Sign in to view the complete answer paper.

b

Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 632, the sum of all its digits is 11.

6 marks

Answer

Sign in to view the complete answer paper.

312 marks
a

Give a brief summary on inheritance with examples.

6 marks

Answer

Sign in to view the complete answer paper.

b

Describe the various forms of implementing interfaces.

6 marks

Answer

Sign in to view the complete answer paper.

4

Explain how to create, access and import packages with an example program.

12 marks

Answer

Sign in to view the complete answer paper.

512 marks
a

Discuss the methods available in the Character Streams.

6 marks

Answer

Sign in to view the complete answer paper.

b

What is difference between Array List and Linked List in collection framework?

6 marks

Answer

Sign in to view the complete answer paper.

612 marks
a

Write a program to read a file content and extract words using String Tokenizer class.

6 marks

Answer

Sign in to view the complete answer paper.

b

How a hash table can change the iterator? Explain.

6 marks

Answer

Sign in to view the complete answer paper.

712 marks
a

Differentiate between checked exceptions and unchecked exceptions with examples.

6 marks

Answer

Sign in to view the complete answer paper.

b

Write a java program to illustrate the usage of try and catch blocks.

6 marks

Answer

Sign in to view the complete answer paper.

812 marks
a

Write a Java program for keyboard events.

6 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between applets and applications.

6 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 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA III, March/April - 2022, R13.

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

Other papers in JAVA PROGRAMMING

Loading Question Papers

Fetching data from database...