Posted by: LondonBridge February 20, 2008
Login in to Rate this Post:
0
?
Here it goes:
String a="Nepal is beautiful";
String b="";
int n=a.length();
for(int i=0;i<n;i++){
if(Character.isWhitespace(a.charAt(i))){
b+=" ";
}
else{
b+="*";
}
}
System.out.println(b);
String a="Nepal is beautiful";
String b="";
int n=a.length();
for(int i=0;i<n;i++){
if(Character.isWhitespace(a.charAt(i))){
b+=" ";
}
else{
b+="*";
}
}
System.out.println(b);