Java Manual
Java Manual
(AY: 2020-21)
Experiment list
Sub – Java Programming Lab
Class – SE IT
ii. Write a menu driven program using switch case to perform mathematical operations.
iii. WAP to display odd numbers from given range/ prime numbers from given range
1
2 1
1 2 3
4 3 2 1
1 2 3 4 5
6 5 4 3 2 1
1 2 3 4 5 6 7
A
CB
FED
JIHG
3. To implement Arrays
i. WAP to find whether the entered 4 digit number is vampire or not. Combination of
digits from this number forms 2 digit number. When they are multiplied by each
other we get the original number. (1260=21*60, 1395=15*93, 1530=30*51)
ii. WAP to display the following using irregular arrays
1
23
456
iii.
4. To implement Vectors
i. WAP that accepts a shopping list of items and performs the following operations: Add an
item at a specified location, delete an item in the list, and print the contents of the vector
ii. Write a java programs to find frequency of an element in the given Vector array.
5. To implement Strings
i. WAP to check if 2 strings are Meta strings or not. Meta strings are the strings
which can be made equal by exactly one swap in any of the strings. Equal string
are not considered here as Meta strings.
Example: str1 = "geeks”, str2 = "keegs"
By just swapping 'k' and 'g' in any of string, both will become same.
Example: str1 = "Converse", str2 = "Conserve"
By just swapping 'v' and’s’ in any of string, both will become same.
ii. Write a java program to count number of alphabets, digits, special symbols, blank
spaces and words from the given sentence. Also count number of vowels and
consonants.
ii. WAP to display area of square and rectangle using the concept of overloaded functions
iii. Write menu driven program to implement recursive functions for following tasks.
a) To find GCD and LCM
b) To find XY
c) To print n Fibonacci numbers
d) To find reverse of number
e) To 1+2+3+4+…….+ (n-1)+n
f) Calculate sum of digits of a number
Student
Test Sports
Result
6. To implement Package
i. WAP to create a user defined package & import the package in another program.
ii. Make jar files for library packages
7. To implement exceptions in Java
i. Write a Java Program to input the data through command Line and Find out total
valid and in-valid integers. (Hint: use exception handling)
ii. Write a Java Program to calculate the Result. Result should consist of name,
seatno, date, center number and marks of semester three exam. Create a User
Defined Exception class MarksOutOfBoundsException, If Entered marks of any
subject is greater than 100 or less than 0, and then program should create a user
defined Exception of type MarksOutOfBoundsException and must have a
provision to handle it.
8. To implement Multithreading
i. Write java program to print Table of Five, Seven and Thirteen using
Multithreading (Use Thread class for the implementation). Also print the total
time taken by each thread for the execution.
ii. Write java program to implement the concept of Thread Synchronization
9. To implement Applets.
i. Write java program to draw the house on an applet.
ii. Write java program to create an advertisement banner on an applet using
multithreading
10. Designing Graphical User Interfaces in Java using AWT and Event handling
i. Write java program to create a registration form using AWT.
ii. On Applet: Take a Login and Password from the user and display it on the third
Text Field which appears only on clicking OK button and clear both the Text
Fields on clicking RESET button.
11. Develop simple swing applications and complex GUI using Java Swing classes.
i. Write a program to create a window with four text fields for the name, street, city
and pin code with suitable labels. Also windows contains a button MyInfo. When
the user types the name, his street, city and pincode and then clicks the button, the
types details must appear in Arial Font with Size 32, Italics.
ii. WA applet with 4 swing buttons with suitable texts on them. When the user presses a
button a message should appear in the label as to which button was pressed by the user
PAC Committee:
Prof.Vinaya Sawant
Prof. Stevina Correia
Prof. Anusha Vegesna