Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad MCA 2017 JAVA PROGRAMMING Previous Question Paper (August - 2017 - R13)
Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit.
Part A
What is a constructor? Explain briefly various types of constructors.
Answer
A constructor is a special member method in Java that is invoked automatically when an object of a class is created. It has the same name as the class and does not have a return type. Constructors are primarily used to initialize the state of an object.
Types of constructors:
- Default Constructor: A constructor provided by the compiler if no constructor is explicitly defined in the class. It initializes instance variables to their default values.
- No-Argument Constructor: A constructor defined by the user that takes no parameters.
- Parameterized Constructor: A constructor that accepts arguments, allowing the user to initialize an object with specific values at the time of creation.
What is inner class? Write its uses.
Answer
An inner class is a class defined within the scope of another class. It has access to the members of the outer class, including private members.
Uses of inner classes:
- Logical Grouping: They allow grouping classes that are used in only one place, making the code more readable and maintainable.
- Encapsulation: They provide a way to hide a class from other classes in the same package, enhancing encapsulation.
- Callback Implementation: They are frequently used to implement event listeners in GUI programming (e.g., anonymous inner classes).
Discuss about Java.net package.
Answer
Sign in to view the complete answer paper.
Discuss about thread priorities and how do set the priory to a thread in java.
Answer
Sign in to view the complete answer paper.
Elaborate the life cycle of applet.
Answer
Sign in to view the complete answer paper.
Part B
Discuss various access modifiers in java.
Answer
Sign in to view the complete answer paper.
Demonstrate string class and the methods available in string class.
Answer
Sign in to view the complete answer paper.
Write a java program to demonstrate method overloading.
Answer
Sign in to view the complete answer paper.
Write the features of java programming language.
Answer
Sign in to view the complete answer paper.
What is inheritance? Write its advantages.
Answer
Sign in to view the complete answer paper.
Write a java program to demonstrate multilevel inheritance.
Answer
Sign in to view the complete answer paper.
What is interface? Explain how it is differ from abstract class.
Answer
Sign in to view the complete answer paper.
Design a java program to implement interface with an example.
Answer
Sign in to view the complete answer paper.
Give an account on Hash Table class and explain with example program.
Answer
Sign in to view the complete answer paper.
Discuss about Treemap interface in detail.
Answer
Sign in to view the complete answer paper.
Explain the steps to create TCP connection using Socket class and design a java program to send a message to the server from client and waiting for response from the server.
Answer
Sign in to view the complete answer paper.
Give a note on checked and unchecked exception.
Answer
Sign in to view the complete answer paper.
Design a java class to handle checked and unchecked exception.
Answer
Sign in to view the complete answer paper.
What is thread and explain life cycle of thread?
Answer
Sign in to view the complete answer paper.
Write a Java program to implement multi threading concept.
Answer
Sign in to view the complete answer paper.
Discuss various layout manages in java.
Answer
Sign in to view the complete answer paper.
Write a java program to create a frame which takes two integers and display the sum of two integers using button events.
Answer
Sign in to view the complete answer paper.
What is delegation event model? Explain in detail.
Answer
Sign in to view the complete answer paper.
Write an applet program to draw an oval.
Answer
Sign in to view the complete answer paper.