Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

Java Programming Lab Programs

Uploaded by

Tejaswini Beri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Java Programming Lab Programs

Uploaded by

Tejaswini Beri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java Programming Lab Programs

1. Write a small java program of about 10 to 15 lines which contains at least one if else condition
and a for loop.

2. Write a Java program to demonstrate the OOP principles. [i.e., Encapsulation, Inheritance]

3. Write a Java program to demonstrate the OOP principles. [i.e., Polymorphism and Abstraction]

4. Write a Java program to handle different types of exceptions. Also, demonstrate the usage of
custom exceptions in real time scenario.

5. Write a Java program on Random Access File class to perform different read and write
operations.

6. Write a program to perform CREATE and READ operations on the student table in a database
using JDBC.

7. Write a program to perform UPDATE and DELETE operations on the student table in a database
using JDBC.

8. Write a Java program that works as a simple calculator. Arrange buttons +, -, *, / operations. Add
a text field to display the result. Handle any possible exceptions like divided by zero.

9. Write a Java program that handles all mouse events and shows the event name at the center of
the window when a mouse event is fired.

Additional Lab Programs


1. Develop a java program to display the following output.
1
12
123
1234

2. Design a java program to find the factorial of a given number.


3. Develop a java program to display the following output.
*
**
***
****
4. Write a java method to find minimum value in given two values.
5. Write a Java program to check whether given number is Armstrong or not.
6. Write a java program that checks whether the given number is Palindrome or not.
7. Write a java program to implement constructor overloading.
8. Write a program that creates two threads. Fist thread prints the numbers from 1 to 10 and the other
thread prints the numbers from 10 to 1.
9. Write an applet code to display “Hello World!”.

You might also like