Questions On Strings in Java
Questions On Strings in Java
1. Design a palindrome class that will input a string from console and check whether the
string is palindrome or not.
2. Write a program to demonstrate various ways to merge two strings.
3. Write a program for reverse a string. (String will be taken as user input through console).
4. Write a program to find all possible subsets of given length in String.
5. Write a program to remove the white spaces from a String.
6. Write a program to use compareTo method of String Class.
7. Write a program to replace character or string.
8. Write a program to replace a substring inside a string by another one.
9. Write a program to find the largest & smallest word in a String.
10. Write a program to display the characters in prime position a given String.
11. Write a program to validate an Email address format.
12. Write a program to count number of words in a given Sentence.
13. Write a program to copy and add all the elements of a Vector to an arrayList.
14. Write a program to Check whether an element exists in Vector or not.
15. Write a program to search element in Vector using index.
16. Write a java program to copy Elements of one Vector to another and display elements of
both the vectors.
17. Write a program to remove element from specified index in Vector.
18. Write a program to sort Vector using Collections.sort().
19. Write a program to replace an element in Vector.
20. Write a program to print fibonacci series up to given terms using recursion.
Eg. Enter term: 5
Fibonacci series is 0 1 1 2 3.