find substring in string java without library function
Anonymous User
3664
String strone = "dishwasher";
        String strtwo = "dish";
        String strthree = strone.substring(0,4);
        System.out.println(strthree + " >>");

        if (strtwo.equalsIgnoreCase(strthree))
        {
            System.out.println("true");
        } else {
            System.out.println("false");
        }
  • This is using substring function, how will i do it without using substring function.
Comments (4)