Java Exam Sets
Java Exam Sets
Compulsory Question
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
UNIT IV
Explain the concept of exception propagation. How does throw and throws work?
UNIT I
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.
UNIT III
Explain how to define and use user-defined packages in Java. Also mention how to set
CLASSPATH.
UNIT IV
UNIT I
UNIT II
UNIT III
UNIT IV
What is GUI in Java? Describe AWT components and layout managers used to design UI.