UNIT-1
1. (a) What is JVM? Explain JVM Architecture?
(b)What is a variable? Explain types of variables in java.
(C)What is type casting? Explain with an example code
2. (a) What is an Array? Explain how to create jagged array in java.
(b) Explain the features of JAVA?
3. (a) What is the need of garbage collection and explain How to call the garbage collector
explicitly with an example.
(b) What recursion? Explain with an example?
4. (a)What is class? Explain how to access the methods from a class with an example?
(b) What is constructor? How to implement the constructors in java?
5. (a) What is Java String Pool? Explain String class methods with an example
(b) What is method overloading? Explain how many ways achieve method overloading with
an example
6. What is String class? Explain all Methods with proper syntax?
7. Explain different methods that can be invoked in garbage collection
8. What is datatype? Explain datatype hierarchy in java with memory size, range and default
values.
UNIT-2
1. What the usage of static keyword with example program?
2. What an inheritance? explain types of inheritances with an examples
3. What is polymorphism? Explain type of polymorphism with suitable codes
4. Differentiate between abstract and non-abstract methods in java with example.
5. What is an Interface? Explain how to achieve inheritance by using an interface with an example
code.
[Link] can you prevent a method from overriding?
[Link] is package? Explain types of packages in java and how to create used defined package
with an example
8. Explain final keyword in java?
9. When will you use the keyword super? Write a java program that demonstrates the use of
“super” keyword
UNIT-3
[Link] is an exception and how to handled exception in java? Illustrate with an example.
[Link] is an error? explain types of errors
[Link] between checked and un-checked exceptions
[Link] Exception keywords in java with an example.
5. a) Explain user-defined exceptions and develop a program that throws the exception when
the user inputs mark greater than 100.
b) Distinguish between throw and throws?
6. Explain the following exceptions with the help of examples:
a) ArithmeticException
b) NullPointerException
7. What are the Java's built-in exceptions? List the checked exceptions defined in the [Link]
and explain them clearly with suitable examples.
8. Write a java program to implement the following exception class
a) NumberFormatException
b) ArrayIndexOutofBoundsException.
9. a) Explain the exception hierarchy in java.
c) Explain user defined exceptions. How do you create user-defined exceptions?
10. a) Explain the life cycle of a thread?
11. How do you create Threads in Java? Explain with an example.
12. How can we solve producer and consumer problem by using wait () and notify () method?
13. What is the difference between a thread and a process?
14. How to achieve synchronization among threads? Write suitable code.
15. Write a program to explain thread priorities usage.
16. Describe the need for thread synchronization. How is it achieved in Java programming?
Explain with a suitable program
17. What are the wait() and sleep() methods?
18. What’s the difference between notify() and notify All()?
19. What is the start() and run() method of Thread class?
20. What’s the purpose of the join() method?
Unit -4
[Link] are the methods supported by the following interfaces. Explain each of them
a. ActionListener interface
b. MouseMotionListener interface
c. TextListener interface.
[Link] are the methods supported by MouseListener Interface. Explain each of them with
examples.
[Link] is Delegation Event model? Explain it. What are its benefits?
[Link] different event classes supported by Java.
[Link] Adapter classes with an example.
[Link] between Swing and AWT.
[Link] different Layout Managers.
[Link] is event source? Give examples of event sources. How events are generated.
[Link] a swing application in Java that receives a number through a Text Field and Print the
factorial of a number when the submit button is pressed.
[Link] is Layout Manager? Explain Border Layout and Grid layout with an Example.
UNIT-5
[Link] the four types of JDBC driver with suitable diagrams
[Link] between Byte Stream Classes and Character Stream Classes.
[Link] between Text input/output Streams and a Binary input/output stream.
[Link] file management using File class with a program
[Link] a Java program to retrieve data from a database.
6. Write steps involved in connecting to a database with an example program.
7. Illustrate the use of StringTokenizer Class.
8. Write a Java program to copy content of [Link] to [Link] using Java file handling.
9. Write a program to copy the contents of file1 to file 2. Read the names of files as command
line arguments.
10. What is collection in Java? Explain Types of Collections and give examples.
11. Explain ArrayList, Vector and Hashtable with example.