Sample Experiments:
Exercise 1:
1. Write a JAVA program to display default value of all primitive data type of JA
2. Write a java program that display the roots of a quadratic equation ax²+bx=0. Calculate the
discriminate D and basing on value of D, describe the nature of root.
Exercise - 2
a) Write a JAVA program to search for an element in a given list of elements using binary search
mechanism.
b) Write a JAVA program to sort for an element in a given list of elements using bubbl
c) Write a JAVA program using StringBuffer to delete, remove character.
Exercise - 3
a) Write a JAVA program to implement class mechanism. Create a class, methods and
invoke them inside main method.
b) Write a JAVA program implement method overloading.
c) Write a JAVA program to implement constructor.
d) Write a JAVA program to implement constructor overloading.
Exercise - 4
a) Write a JAVA program to implement Single Inheritance
b) Write a JAVA program to implement multi level Inheritance
c) Write a JAVA program for abstract class to find areas of different shapes
Exercise - 5
a) Write a JAVA program give example for "super" keyword.
b) Write a JAVA program to implement Interface. What kind of Inheritance can be ach
c) Write a JAVA program that implements Runtime polymorphism
Exercise - 6
a) Write a JAVA program that describes exception handling mechanism b) Write a JAVA program
Illustrating Multiple catch clauses
Write a JAVA program for creation of Java Built-in Exceptions
Write a JAVA program for creation of User Defined Exception
Exercise - 7
a) Write a JAVA program that creates threads by extending Thread class. First thre display "Good
Morning "every 1 sec, the second thread displays "Hello "every seconds and the third display
"Welcome" every 3 seconds, (Repeat the same implementing Runnable)
b) Write a program illustrating is Alive and join()
c) Write a Program illustrating Daemon Threads.
d) Write a JAVA program Producer Consumer Problem
Exercise - 8
2. Write a JAVA program that import and use the user defined packages
3. Without writing any code, build a GUI that display text in label and imag in an ImageView (use JavaFX)
4. Build a Tip Calculator app using several JavaFX components and learn how t respond to user
interactions with the GUI
Exercise - 9
1. Write a java program that connects to a database using JDBC
b) Write a java program to connect to a database using JDBC and insert values into it.
c) Write a java program to connect to a database using JDBC and delete values from i
Textbooks:
1. JAVA one step ahead, Anitha Seth, B.L.Juneja, Oxford.
2. Joy with JAVA, Fundamentals of Object Oriented Programming, Introduction 3. JAVA 9 for
Programmers, Paul Deitel, Harvey Deitel, 4th Edition, Pearson.