MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?public class Result { public static void main(String args[]) { String a = "hello i love interview mania"; System.out.println(a.indexOf('i')+" "+a.indexOf('o') +" "+a.lastIndexOf('i')+" "+a.lastIndexOf('o')); } } |
| A. | 6 4 26 4 |
| B. | 4 6 21 4 |
| C. | 4 4 6 21 |
| D. | 21 6 4 4 |
| E. | 4 21 6 4 |
| Answer» B. 4 6 21 4 | |