OneCompiler

Problem1

122

public class Problem1 {
public static void main(String[] args) {
String s1="this is my world and this is my home";
String[] str=s1.split(" ");
String s2="is";
String n="";
for(int i=0;i<str.length;i++)
{
if(!str[i].equals(s2))
{
n+=" "+str[i];
}
}
System.out.println(n);
}
}