0% found this document useful (0 votes)
163 views

Java Exercises

The document contains a list of 50 exercises for a Java training team. The exercises include writing programs to: 1) Move a file between directories at a specified time. 2) Design the "FLAMES" game by removing common characters from two input strings and using the count to select characters from the word "FLAMES". 3) Read an Excel sheet and convert the data to a CSV file.

Uploaded by

Sukhanya Ayappan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
163 views

Java Exercises

The document contains a list of 50 exercises for a Java training team. The exercises include writing programs to: 1) Move a file between directories at a specified time. 2) Design the "FLAMES" game by removing common characters from two input strings and using the count to select characters from the word "FLAMES". 3) Read an Excel sheet and convert the data to a CSV file.

Uploaded by

Sukhanya Ayappan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Miracle Training Team

Miracle Software Systems (I) Pvt. Ltd. Page: 1 of 3




M I R A C L E S O F T W A R E S Y S T E M S , I N C .












Exercises































Miracle Training Team


Miracle Software Systems (I) Pvt. Ltd. Page: 2 of 3

1. Write a Java program to move a file from source directory to destination directory at a specified date
and time?
2. Write a Java program to design the game "FLAMES" by reading two strings from the keyboard.
Hint: From the two input string remove the common characters and then count the number of left
character from both the string. Apply this count on "FLAMES", which character comes for the count
remove that character from "FLAMES" repeat the same until we get last character from "FLAMES" and
display the result?
3. Write a Java program to read a Excel sheet and tranfrom the data into a CSV file?
4. Write a Program to display the type of the permission on a file and change the permission mode from
one to another?
5. Use Properties class to develope the code for the second program.
6. Write a thread program to display number of characters, words, lines and similar words with frequency
from a file?
7. Write a Program to Calculate Sum & Average of an Array
8. Write a Program to Find the Largest Two Numbers in a given Array
9. Write a Program to Put Even & Odd Elements of an Array in 2 Separate Arrays
10. Write a Program to Insert an Element in a Specified Position in a given Array
11. Write a Program to Sort the Array in an Ascending Order
12. Write a Program to Sort the Array in Descending Order
13. Write a Program to Find the Second Largest & Smallest Elements in an Array
14. Write a Program to Delete the Specified Integer from an Array
15. Write a Program to Split an Array from Specified Position & Add First Part to the End
16. Write a Program to Sort Names in an Alphabetical Order
17. Write a Program to Read an Array and Search for an Element
18. Write a Program to Merge and Sort Elements of 2 different Arrays
19. Write a Program to Print the Number of Odd & Even Numbers in an Array
20. Write a Program to Print All the Repeated Numbers with Frequency in an Array
21. Write a Program to Find the Largest Number in an Array
22. Write a Program to Find the Number of Elements in an Array
23. Write a Program to Find the two Elements such that their Sum is Closest to Zero
24. Write a Program to Find 2 Elements in the Array such that Difference between them is Largest
25. Write a Program to Increment Every Element of the Array by One & Print Incremented Array
26. Write a Program to Find the Number of Non Repeated Elements in an Array
27. Write a program to Concatenate string using for Loop
28. Write a program to convert given no. of days into months and days
29. Write a Program to read two Strings & Concatenate the Strings
30. Write a Program to Replace Lowercase Characters by Uppercase & Vice-Versa
31. Write a Program to Count the Number of Vowels & Consonants in a Sentence
32. Write a Program to Check if the Substring is present in the given String
33. Write a Program to Accepts two Strings & Compare them
34. Write a Program to Find the Length of a String without using the Built-in Function or methods
Miracle Training Team


Miracle Software Systems (I) Pvt. Ltd. Page: 3 of 3
35. Write a Program to Find the Frequency of the Word the in a given Sentence
36. Write a Program to Read a String and find the Sum of all Digits in the String
37. Write a Program to find the First Capital Letter in a String
38. Write a Program to find the Length of the String
39. Write a Program to Count the Occurence of a Substring in String
40. Write a Program to Remove given Word from a String
41. Write a Program to Find Highest Frequency Character in a String
42. Write a Program to Reverse every Word of given String
43. Write a Program to Print the Words Ending with Letter S
44. Write a Program to Find the Sum of ASCII values of All Characters in a given String
45. Write a Program to Insert Character/Word in any Desired Location in a String
46. Write a Program to Search a Word & Replace it with the Specified Word
47. Write a Program to Display the Characters in Prime Position a given String
48. Write a Program to Delete All Repeated Words in String
49. Write a Program to Sort Word in String
50. Write a Program that takes input as 2323 and gives output as 2332. ie. the new number should be
greater than the previous number but should have the same digits

You might also like