Search:

Type: Posts; User: Json

Search: Search took 0.09 seconds.

  1. Replies
    5
    Views
    11,297

    Re: contains vs. indexOf

    The methods have different use, if you need to check if the String contains something then use the contains, but if you want to know where in the String it is contained, use the indexOf method.

    //...
  2. Replies
    5
    Views
    11,297

    Re: contains vs. indexOf

    First off, contains returns true/false while indexOf will return the index of the search.

    But the magic is in the contains method, you ready for this, its a funny one :)



    public boolean...
Results 1 to 2 of 2