- Open DrJava and expand the Interactions pane.
- Enter the following code.
Welcome to DrJava. Working directory is /Users/jamesbrannan > String fruit="banana"; > int index = fruit.indexOf('a'); > index 1 > int index = fruit.indexOf('a', 2); > index 3
Welcome to DrJava. Working directory is /Users/jamesbrannan > String fruit="banana"; > int index = fruit.indexOf('a'); > index 1 > int index = fruit.indexOf('a', 2); > index 3