Return the index (position) of the first occurrence of "e" in the following string:

String txt = "Hello Everybody"; System.out.println(txt._______(___));

4/19/2019 7:19:00 AM


2 Answers

New Answer


Thanks. I later got the code to be System.out.println(txt.indexOf("e"));


I suggest you to review the chapter if this was a quiz in the lesson. You can also consult the comments in the lesson, many people explain subjects in comments, you can express your doubts too.