I have one example.
public class Test {
public static void main(String[] args) {
String a="VIJAY KAKADE";
String b="VIJAY KAKADE";
if(a.equalsIgnoreCase(b)){
System.out.println("yes");
}else{
System.out.println("no");
}
}
}
I need to check these strings without considering spaces. How do I achieve this? How do I ignore spaces in the strings when I compare them?
st.replace(" ","")
is your friend.