MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class IndexOf_Example { public static void main(String args[]) { String str="My first love is java."; System.out.println(str.indexOf('i')+" "+str.indexOf('o')+" "+str.lastIndexOf('i')+" "+str.lastIndexOf('j') ); } } |
| A. | 10 14 17 4 |
| B. | 17 14 10 4 |
| C. | 4 10 14 17 |
| D. | 10 4 14 17 |
| E. | None of these |
| Answer» D. 10 4 14 17 | |