0% found this document useful (0 votes)
35 views3 pages

Java Programs

The document contains 28 programming tasks related to Java including: 1) Writing programs to solve quadratic equations, check for prime numbers, perform binary and bubble sort, and check for palindromes. 2) Creating classes with methods and constructors, inheritance, abstract classes, and method overriding. 3) String operations using ArrayLists including append, insert, search, and filtering. 4) Exception handling using multiple catch clauses, throwing exceptions, finally block, and built-in vs user-defined exceptions. 5) Creating threads using the Thread class and Runnable interface with threads running at different intervals. 6) File I/O to get character, line, and word counts. Database connectivity using J

Uploaded by

sravani b
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
35 views3 pages

Java Programs

The document contains 28 programming tasks related to Java including: 1) Writing programs to solve quadratic equations, check for prime numbers, perform binary and bubble sort, and check for palindromes. 2) Creating classes with methods and constructors, inheritance, abstract classes, and method overriding. 3) String operations using ArrayLists including append, insert, search, and filtering. 4) Exception handling using multiple catch clauses, throwing exceptions, finally block, and built-in vs user-defined exceptions. 5) Creating threads using the Thread class and Runnable interface with threads running at different intervals. 6) File I/O to get character, line, and word counts. Database connectivity using J

Uploaded by

sravani b
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

1. Write a java program that display the roots of a quadratic equation ax2+bx=0.

Calculate the discriminate D and basing on value of D, describe the nature of


root.

2. 2) Write a Java Program to find the given number is prime number or not.

3. Write a JAVA program to search for an element in a given list of elements using
binary search mechanism.

4. Write a JAVA program to sort for an element in a given list of elements using
bubble sort

5. Write a JAVA program that checks whether a given string is a palindrome or


not. Ex: MADAM is a palindrome

6. Write a program to create a class Student with data ‘name, city and age’ along
with method printData to display the data. Create the two objects s1 ,s2 to
declare and access the values.

7. Write a program in JAVA to demonstrate the method and constructor


overloading.

8. Write a program in JAVA to create a class Bird also declares the different
parameterized constructor to display the name of Birds.

9. Write a JAVA program to implement Single Inheritance.

10. Write a JAVA program to implement multi level Inheritance

11. Write a java program for abstract class to find areas of different shapes

12. write a java program implements Runtime polymorphism (Method Overriding)

13. Write Java Program to Perform String Operations Using Arraylist. Write
Functions for the following
Append
Insert
Search
List all string starts with given letter

14. .Write a JAVA program that describes exception handling mechanism

15. Write a JAVA program Illustrating Multiple catch clauses

16. .Write a JAVA program for creation of Illustrating throw

17. Write a JAVA program for creation of Illustrating finally

18. Write a JAVA program for creation of Java Built-in Exceptions

19. Write a JAVA program for creation of User Defined Exception

20. Write a JAVA program that creates threads by extending Thread class .First
thread display “Good Morning “every 1 sec, the second thread displays “Hello
“every 2 seconds and the third display “Welcome” every 3 seconds ,(Repeat the
same by implementing Runnable).

21. Write a java program that displays the number of characters, lines and words in
a text file

22. Write a java program that connects to a database using JDBC of the following a.
add b. Delete c. Modify d. Retrieve operations.

23. Write a java program to create a package called employee and implement this
package out of the package.

24. Write a JAVA program to paint like paint brush in applet.


25. Develop an Applet that receives an integer in one text field & compute its
factorial value & returns it in another text filed when the button “Compute” is
clicked..

26. Write a JAVA program that identifies key-up key-down event user entering
text in a Applet.

27. Write a JAVA program to display the digital watch in swing tutorial.

28. Write a JAVA program JTree as displaying a real tree upside down

You might also like