What is the best way to compare that given String start With another String
Example :
if("ABCD1234".startsWith("ABCD")){
System.out.println("This is true ");
}
if("ABCD1234".substring(0,4).equalsIgnoreCase("ABCD")){
System.out.println("This also true ");
}
Or are there any other solutions ?