This document contains a list of 60 Java programs covering fundamental Java concepts like Hello World, data types, control flow, OOPs concepts, exception handling, multithreading, file handling, string operations, and database operations. The programs provide examples of basic calculations, conditional logic, classes and objects, inheritance, interfaces, packages, exceptions, threads, file I/O, string processing, and database connectivity.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
43 views
Java Programs
This document contains a list of 60 Java programs covering fundamental Java concepts like Hello World, data types, control flow, OOPs concepts, exception handling, multithreading, file handling, string operations, and database operations. The programs provide examples of basic calculations, conditional logic, classes and objects, inheritance, interfaces, packages, exceptions, threads, file I/O, string processing, and database connectivity.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
List of Java Programs
1. WAP to display “Hello World”
2. WAP to find the average of 2 numbers. 3. WAP to find the greatest of three numbers. 4. WAP to find the sum, product and difference of 2 numbers using choice entered by the user. 5. WAP to check whether a number is palindrome or not. 6. WAP to check whether a number is prime or not. 7. WAP to show the working of labeled break statement 8. WAP to show the working of labeled continue statement 9. WAP to show the concept of vararg methods. 10.WAP to show the concept of overloaded vararg methods. 11.WAP to input n elements and find their average. 12.WAP to input n elements and find the minimum and maximum. 13.WAP to input n elements and search a particular element in the list. 14.WAP to input a matrix and print the sum of its rows and columns 15.WAP to input a square matrix and print the sum of its diagonal elements. 16.WAP to print the transpose of a matrix. 17.WAP to find the product of 2 matrices. 18.WAP to show an example of irregular arrays. 19.WAP to show the working of enhanced for 20.WAP to find the area of a rectangle by using Rectangle class. 21.WAP to show how array of objects can be created using Rectangle class. 22.WAP to show how objects can be passed to and returned from a function 23.WAP to show the concept of static member functions. 24.WAP to show the concept of constructor overloading 25.WAP to show the concept of Single Inheritance. 26.WAP to show the concept of Multi-level Inheritance. 27.WAP to show the concept of Hierarchal Inheritance. 28.WAP to show the concept of Dynamic Polymorphism using shape class example 29.WAP to show how a class may implement multiple interfaces. 30.WAP to show how one interface may extend another interface. 31.WAP to show how one class may extend another class and implement an interface also at the same time. 32.WAP to show the concept of Dynamic Polymorphism using interfaces 33.WAP to show how to store a class in a particular package. 34.WAP to show how to access a class stored in a different package. 35.WAP to show how one class may extend another class stored in a different package. 36.WAP to show an example of try catch block for exception handling. 37.WAP to show multiple catch blocks can be used with a try block. 38.WAP to show the use of finally block. 39.WAP to show working of nested try catch blocks. 40.WAP to show an example of how exceptions are handled in a called function. 41.WAP to show how user defined exception classes can be created. 42.WAP to show an example of multi-threading using Thread class. 43.WAP to show an example of multi-threading using Runnable interface. 44.WAP to show how priorities can be assigned to threads. 45.WAP to show an example of thread synchronization 46.WAP to show an example of inter thread communication 47.WAP to read and write bytes from a file. 48.WAP to write data about a student into a file and then read it. 49.WAP to show how files can be accessed randomly. 50.WAP to show how objects can be written to and read from a file. 51.WAP a program to show the use of BufferedInputStream and BufferedOutputStream classes 52.WAP to count vowels in a string 53.WAP to count special characters in a string 54.WAP to check if a string is a palindrome or not. 55.WAP to toggle the characters in a string 56.WAP to count the number of words in a string 57.WAP to show how records can be fetched from a database 58.WAP to show how records can be updated in a database 59.WAP to show how records can be deleted from a database 60. WAP to show how records can be inserted in a database
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab