I am getting the solution is as follows
class StringCheck
{
public static void main (String[] args)
{
String str="Hello world I am here";
String r;
System.out.println(str);
r = str.replaceAll(" ","");
System.out.println(r);
}
}
OUTPUT: HelloworldIamhere
but I don't want to use a library function i.e str.replaceAll(), Can anyone help me with the program.I want same output as I got using library function