Search:

Type: Posts; User: m2msucks

Search: Search took 0.09 seconds.

  1. Re: Checking whether a string is a substring of another string without using indexOf

    import java.util.*;
    import java.lang.String;

    public class CheckingSubstring2 {
    public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    System.out.print("Please...
  2. Re: Checking whether a string is a substring of another string without using indexOf

    Oh I see. I guess my code isn't working correctly. I also found out I need to put a test to make sure string2 is longer than string1. Thanks.
  3. Re: Checking whether a string is a substring of another string without using indexOf

    @Junky Thanks. I modified my code and it seems like it's working. I've tried using several different strings and they all seem to work. For some reason, I think there might still be something wrong...
  4. Checking whether a string is a substring of another string without using indexOf

    The following topic has been cross posted here.

    Write a method that checks whether a string is a substring of another string. Write a test program that prompts the user to enter two strings, and...
Results 1 to 4 of 4