public class JAVA_047 { public static void main(String[] args) { String Str=\"Too many cooks\"; System.out.println(\"Str : \" + Str); if(Str.startsWith(\"Too\")) System.out.println(\"The String Str start with the sub-string \\\"Too\\\"\"); else System.out.println(\"The String Str do not start with the sub-string \\\"Too\\\"\"); if(Str.endsWith(\"COoks\")) System.out.println(\"The String Str start with the sub-string \\\"COoks\\\"\"); else System.out.println(\"The String Str do not start with the sub-string \\\"COoks\\\"\"); } }