length() method example- Core Java

Q.  The following program is an example of?

class Simple{
public static void main(String args[]){

String s="Sachin";
System.out.println(s.length());//6
}
}

- Published on 20 Jul 15

a. length() method
b. intern() method
c. trim() method
d. charAt() method

ANSWER: length() method

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)