JNTU
JNTU MCA 2019 JAVA PROGRAMMING Previous Question Paper (December - 2019 - R17)
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.
Part A
5 × 5 Marks = 25
Explain various iterative statements used in Java with examples.
Answer
Java provides three primary iterative statements to execute a block of code repeatedly:
- for loop: Used when the number of iterations is known. for(initialization; condition; increment/decrement) { // body }
- while loop: Executes as long as the condition is true, checking before each iteration. while(condition) { // body }
- do-while loop: Similar to while, but guarantees at least one execution because the condition is checked after the body. do { // body } while(condition);
Define CLASSPATH. Discuss the role of class path in packages.
Answer
CLASSPATH is an environment variable that tells the Java Virtual Machine (JVM) and the Java compiler where to look for user-defined classes and packages. When working with packages, the CLASSPATH must point to the root directory containing the package structure. If a class is in package com.example, the CLASSPATH should point to the directory containing the com folder, allowing the compiler to resolve fully qualified names correctly.
What is Multi threading? Differentiate between the multi tasking and multi threading.
Answer
Sign in to view the complete answer paper.
Explain mouse event class with an example.
Answer
Sign in to view the complete answer paper.
Compare and contrast Swing and AWT in Java.
Answer
Sign in to view the complete answer paper.
Part B
5 × 10 Marks = 50
Explain principles of object oriented programming languages.
Answer
Sign in to view the complete answer paper.
What are constructor, destructor? How to implement constructors in Java?
Answer
Sign in to view the complete answer paper.
Explain how to implement Dynamic method dispatch in Java.
Answer
Sign in to view the complete answer paper.
What is Inner class? What are its Advantages? How to implement Inner class in Java?
Answer
Sign in to view the complete answer paper.
What is inheritance? Describe various forms of inheritance in Java? Give an example Java code for each case.
Answer
Sign in to view the complete answer paper.
What is package? How to implement user defined packages in Java.
Answer
Sign in to view the complete answer paper.
What is interface? How to implement interface in Java.
Answer
Sign in to view the complete answer paper.
List out various classes in Java.io package and explain them clearly.
Answer
Sign in to view the complete answer paper.
How to implement multithreading in Java.
Answer
Sign in to view the complete answer paper.
How to implement user defined exceptions in Java with example.
Answer
Sign in to view the complete answer paper.
Explain how to implement thread priorities in Java with examples.
Answer
Sign in to view the complete answer paper.
Explain multiple catch statement with example.
Answer
Sign in to view the complete answer paper.
Discuss about Border and grid Layout managers in Java.
Answer
Sign in to view the complete answer paper.
What is Listener Interfaces? Illustrate Mouse motion listener interfaces with suitable Java Program.
Answer
Sign in to view the complete answer paper.
What is AWT? Explain in detail about hierarchy for AWT.
Answer
Sign in to view the complete answer paper.
Explain about Events, Event sources event classes.
Answer
Sign in to view the complete answer paper.
What is swing? Explain various swing components.
Answer
Sign in to view the complete answer paper.
Develop an applet that receives principle, rate of interest, number of years from the key board and display the simple interest on the screen.
Answer
Sign in to view the complete answer paper.
Write Java program that works as a calculator using in Java swings.
Answer
Sign in to view the complete answer paper.
Describe parameters passing to an applet with a program.
Answer
Sign in to view the complete answer paper.