For this program the user is told to input a data in the form of "mm/dd/yyyy" and I'm trying to use the `indexOf()` method with the parameter of "/" to break the date string into three substrings. 

I tried doing this:

```java
String monthString = dateString.substring(0,dateString.indexOf("/"));
    String dayString = 
    dateString.substring(dateString.indexOf("/"),DateString.indexOf("/")+1)

```

Thank you.
Edit. Thank you all for your responses, but my teacher said that i cannot use the split fucntion. He said I can solve this using just indexOf("/") and substring(). I'll need two calls to indexOf("/") and four calls to substring().