0% found this document useful (0 votes)
0 views

Java Exam Sets

Uploaded by

u9100289
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Java Exam Sets

Uploaded by

u9100289
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Set 1 - The Melody of Fundamentals

Compulsory Question

(1) Explain the features that make Java a platform-independent language.

(2) Describe method overloading with examples.

(3) Explain the role of constructors in inheritance.

(4) Distinguish between lexical tokens and literals in Java.

UNIT I

Explain the concept of Java Virtual Machine (JVM) and its role in bytecode execution.

Write a Java program using else-if ladder to classify a number as negative, zero, or positive.

UNIT II

What are inner classes in Java? Explain their types with suitable examples.

Define a string using both String and StringBuffer class. Show basic operations on both.

UNIT III

Explain multilevel inheritance in Java with an example.

What are interfaces in Java? Compare them with abstract classes.

UNIT IV

Explain the concept of exception propagation. How does throw and throws work?

What is the applet life cycle? Describe its stages in detail.


Set 2 - The Rhythm of Realms
Compulsory Question

(1) What are the primitive data types in Java?

(2) What is the difference between checked and unchecked exceptions?

(3) Explain the use of super keyword in Java.

(4) How does Java achieve polymorphism?

UNIT I

Describe the relationship between JDK, JRE, and JVM.

Write a Java program to read user input from console and display it back.

UNIT II

Define static members. Write a program demonstrating a static method and static variable.

How do arrays differ from strings in Java? Explain with examples.

UNIT III

Explain how to define and use user-defined packages in Java. Also mention how to set

CLASSPATH.

UNIT IV

Write short notes on the following:

(a) Applet tag and embedding an applet in HTML

(b) Types of containers and layout managers in AWT


Set 3 - The Symphony of Structure
Compulsory Question

(1) What are identifiers and keywords? Give examples.

(2) Describe constructor overloading in Java.

(3) Explain hierarchical inheritance with a Java example.

(4) What is the role of finally block?

UNIT I

Explain Java's lexical structure: tokens, comments, and operators.

Write a Java program to calculate the LCM of two numbers.

UNIT II

What is an abstract class? Write a program demonstrating its use.

Show how polymorphism is achieved using method overriding.

UNIT III

Explain the concept of access protection in packages.

Describe how constructors are handled during inheritance with example.

UNIT IV

Explain the use of multiple catch blocks in exception handling.

What is GUI in Java? Describe AWT components and layout managers used to design UI.

You might also like