How do I get the length of a String?

John Zukowski

The String class provides a length() method that returns the length of that String:

// This sets length to 7
int length = "The End".length();
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact