Java Assignment 2024
Java Assignment 2024
Java Assignment 2024
1. 1
10
101
1010
10101
2 3 4 5 𝑛
2. 1 + 2! − 3! + 4! − 5! + ⋯ + 𝑛!
3. Write a program in java to accept a string and print it in reverse order and also check whether the
string is palindrome or not.
4. Design a class to represent bank account with following members:
To initialize data to display all information of an object of bank account class. Write a program
to test above class.
12. Write a program in java to accept a string in lower case and change the first letter of every word to upper
case. Display the new string.
13. Write a program to extract a substring starting from nth position and ending at kth position from a
given string.
15. Write a program that prints two words “PING” and “PONG” in a multithreaded environment. A
delay of 3 sec should be created between those two words while printing.
16. Develop an applet that receives two numbers and display their GCD,LCM, MAXIMUM,
MINIMUM in text box. Write a program to test above applet.
17. Create a class called Matrix. It includes methods called “matMul” for multiplying two Matrix
objects and return the resultant Matrix object and “matAdd” for adding two Matrix objects and
return the resultant Matrix.
18. Write a program that accepts a list of seven items and store them in a vector. Include a method.
a to delete 2nd item.
b To insert an item at 3rd position.
c To print all elements of vector.
d To insert an element at last.
19. Write a program to create a text file to store name and address of different customers. Also include
a method to find address against a given name.