Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad MCA 2018 JAVA PROGRAMMING Previous Question Paper (June/July - 2018 - R15)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.
Part A
Define autoboxing and unboxing.
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). Unboxing is the reverse process, where the compiler automatically converts an object of a wrapper type back into its corresponding primitive value.
Define the syntax for creation of inner class.
Answer
An inner class is defined within the scope of an outer class. The syntax is as follows:
class InnerClass {
// body of inner class
}
}
Differentiate treemap and hashmap.
Answer
Sign in to view the complete answer paper.
Define daemon threads.
Answer
Sign in to view the complete answer paper.
Define the syntax for checkbox with example.
Answer
Sign in to view the complete answer paper.
Part B
Explain about the following: a) abstraction b) encapsulation c) dynamic binding d) inheritance
Answer
Sign in to view the complete answer paper.
Write a short note on public, private and protected access specifiers.
Answer
Sign in to view the complete answer paper.
Explain about copy constructor.
Answer
Sign in to view the complete answer paper.
What is a nested class? Differentiate between static nested classes and non-static nested classes.
Answer
Sign in to view the complete answer paper.
How to define a package? How to access, import a package? Explain with examples.
Answer
Sign in to view the complete answer paper.
Discuss various forms of inheritance.
Answer
Sign in to view the complete answer paper.
Give an example for function overloading and explain.
Answer
Sign in to view the complete answer paper.
Illustrate with an example the usage of TreeSet and TreeMap classes.
Answer
Sign in to view the complete answer paper.
Differentiate vector and arraylist with examples.
Answer
Sign in to view the complete answer paper.
Explain collection frame work with examples.
Answer
Sign in to view the complete answer paper.
What is meant by user-defined exceptions? Demonstrate with example.
Answer
Sign in to view the complete answer paper.
Explain the procedures to create a new thread.
Answer
Sign in to view the complete answer paper.
What is an exception? What are the benefits of exception handling?
Answer
Sign in to view the complete answer paper.
Explain with suitable example java programs the following: i) Rethrowing an exception. ii) Method Specifying exceptions.
Answer
Sign in to view the complete answer paper.
Explain delegation event model.
Answer
Sign in to view the complete answer paper.
Write a JAVA program for handling key events.
Answer
Sign in to view the complete answer paper.
Write a JAVA program that works as simple calculator. Use a grid layout to arrange buttons for digits and for the +, -, *, % operations. Add a text field to display the result.
Answer
Sign in to view the complete answer paper.