public class RemoveCharacterFromArray
{
public static void main(String args[])
{
String s = "Umesh kumar kushwaha";
String r[] = s.split("s|h");
String res = "";
for (String m : r)
{
res = res + m;
}
System.out.println(res);
}
}
{
public static void main(String args[])
{
String s = "Umesh kumar kushwaha";
String r[] = s.split("s|h");
String res = "";
for (String m : r)
{
res = res + m;
}
System.out.println(res);
}
}
Output:
Ume kumar kuwaa
BUILD SUCCESSFUL (total time: 0 seconds)
|
No comments:
Post a Comment