MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program? class output { public static void main(String args[]) { String a="hello i love java"; System.out.println(indexof('i')+" "+indexof('o')+" "+lastIndexof('i')+" "+lastIndexof('o') )); } } |
| A. | 6 4 6 9 |
| B. | 5 4 5 9 |
| C. | 7 8 8 9 |
| D. | 4 3 6 9 |
| Answer» B. 5 4 5 9 | |