stringpractice
DESCRIPTION
You can practice Strings in JavaTRANSCRIPT
String:
1- WAP to remove all the spaces from a string given by user.
(Ex “ I am reading Java ”----- “IamreadingJava”)
2- WAP to count the frequency of all the character which are present in a
given string.(Ex“java needs practice”--- )
3- WAP to check weather a string given by user is a palindrome or
not.(Without use of reverse method of StringBuffer class)
4- Write a method that returns second index position using the following
header: static int position(String s, char c)
5- Write a method that returns a sorted string using the following header:
int location(char c) which return the index position of first occurance a
character which is present in the string else return -1.(without use of
indexOf() )
6- Write a method that returns a sorted string using the following header:
public static String sort(String s) (Ex.sort("acb") ----abc.
Write a test program that prompts the user to enter a string and displays
the sorted string.