You are on page 1of 3

JAVA LAB CYCLE

1.
2.
3.
4.
5.
6.
7.

Write a program to find the sum of n numbers


Write a program to find the sum of digits of a number
To reverse a given number
Write a program to check whether a given number is odd or even.
Find the Armstrong numbers in a given range.
Find the prime numbers within a range.
Write a program to create a menu with the choices sum on n numbers, sum of digits of a
number, reverse of a number, check odd or even, Armstrong numbers in a given range,

prime numbers within a range


8. Generate Fibonacci series up to a limit.
9. Draw a number triangle.
10. Perform matrix operations
i)
Find the transpose of matrix
ii)
Check whether a matrix is symmetric or not.
iii)
Add two matrices
iv)
Multiply two matrices
v)
Check whether the given matrix is identity matrix or not.
vi)
Enter two matrices and check whether one matrix is the transpose of the other.
vii)
Find the sum of row and column elements in a given matrix.
11. Write a program to sort the elements of an array using two dimensional array by entering
the values from the key-board and also find out the largest and smallest element from a
two dimensional array.
12. Find the factorial of a number using recursion.
13. Create a class Bank-Account with member variables-AcctNo, CustomerName , Balance
and methods getDetails, deposit, withdraw, displayDetails , without using constructors.
Every account must ensure a minimum balance. Get the details of n customers, perform
the transactions and display the details.
14. Implement the above program using constructors.
15. Overload the method volume that returns volume of different shapes. The method is to be
overloaded with one parameter,2 parameters and 3 parameters and the parameters must
accept fractional values. Calculate the volume of at least 3 different shapes.
16. Overload the method max that displays the maximum value of its arguments. The first
version takes2 integer values and returns its maximum, second version takes an array of
integer values and returns its maximum.
17. Implement the use of static and non-static blocks.
18. Find the number of characters in each string that is passed as command line argument and
also find the total number of vowels in it.
19. Find the product of n numbers that is passed as command line argument.
20. Implement the use of Varargs method.
21. Implement the use of this, return, final and super.
22. Define a class named Vehicle that defines the methods which are the properties of the
vehicle class. Define another class called Car that should have the properties of Vehicle
and in addition to that it has its own methods for specifying its behavior. Define a specific

car type (for eg-Ford Figo ) as another class that should have the properties of car and
obviously vehicle. Create objects of the specific car type and use all methods.
23. Create a class name Shape with two place holders area () and perimeter (). By using the
properties of the Shape class calculate the area and perimeter of Rectangle, Circle and
Triangle.
24. Implement Dynamic method dispatch to calculate the volume of at least 3 different
shapes.
25. Define one class that contains placeholders for getting the personal details of students.
Create two interfaces that contain methods for accepting course details and mark details.
Implement multiple inheritance and display all details of students.
26. Define a package ArithOper that contain classes to perform Addition, Subtraction,
Multiplication and Division. Import this package and perform the corresponding
operations.
27. Create a user defined exception and use it. Handle this exception by all possible
keywords.
28. Create multiple threads and use all possible methods associated with Threads.
(isAlive(),join(),start(),sleep(),stop()).
29. Illustrate the use of synchronized keyword.
30. Perform some file operations and also read the content of a file and write it to another
file.
31. Implement all the String functions
32. A) With the help of Generic class, find the average of 5 numbers.(Both Integer and
Floating point values).
33. Implement the same using Wildcard arguments
34. Using applet, draw
a) Indian Flag
b) Clock
c) Star
d) Polygon with eight corners
e) Display greeting card
f) Display message using 4 different fonts
35. Draw a human face using applet
36. Using applet, scroll a message from right to left across the applets window.
37. Handle all mouse events using applet
38. Handle only the mouse events mouse pressed and mouse dragged with the help of adapter
class.
39. Handle all keyevents using applet
40. Using applet, play an audio file.
41. Without using buttons, enter 3 values in 3 textboxes and find the sum of these values by
displaying the result in the applet window.
42. Prepare a Job Resume using applet .Accept all required details from user and when the
submit button is pressed all the details are to be displayed on a text area.
43. Draw the structure of a house. It should contain one door and two windows. Door is to be
represented using vertical scrollbar and windows are to be represented using horizontal
scrollbar. Change the colour of the house when you move these scrollbars.

44. Implement all Layouts.


45. Create menus- File, Edit, and Help. File menu includes menu items New, Open and
Save. When Open is clicked, the corresponding dialog box is to be displayed. A separator
should be there between Open and save. Save as is the sub menu item of Save. Edit menu
contains menu items Cut Copy and Paste. Help should contain menu items Help topics
and about Applet and those items are to be of checkable. The menu items of Edit should
be displayed as Pop up Menu items also.
46. Create your own webpage containing HTML Headings, Paragraphs, Text formatting,
HTML Styles , Links, Images, Lists, Tables, Forms and Frames.
47. Create a database named Company in MS Access. Create a table Employee with fieldsEmpid(primary key), Empname, Designation, Branchname, Salary. Store at least 5 rows
of information and update at least any one row.
48. Read the details of a Student(Roll No ,Name and Marks for 5 subjects) from an HTML
web page and display the total Mark and % of Marks obtained along with all data passed
from the HTML web page using Servlet.
49. Write a servlet program to read and write a cookie.
50. Implement session handling in java servlets.
51. Read the details of an Employee(ENo ,Name and salary/month) from an HTML web
page and display the details(ENo, Name and Total salary of the employee earned in a
year) using JSP.
52. Write a JSP program to read and write a cookie.
53. Implement session handling in JSP
54. Using JavaScript
a)
b)
c)
d)

Create popup boxes


Display the no:of time you moved your mouse over the link.
While clicking each buttons, change the background color of the webpage.
While loading the web page , change the background color of the webpage.

55. Write a socket programming to implement communications

You might also like