English

What will be the output of the following code? String s = "malayalam"; System.out.println(s.indexOf('m')); System.out.println(s.lastlndexOf('m')); - Computer Applications

Advertisements
Advertisements

Question

What will be the output of the following code? 

String s = "malayalam"; 
System.out.println(s.indexOf('m')); 
System.out.println(s.lastlndexOf('m'));
Short Answer

Solution

0
8

shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - Review Insight [Page 284]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
Review Insight | Q 3. | Page 284
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×