More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. Class lengofstring {
Public static void main(String[] arr) {
int i = 0;
String s = "hello world!";
for (char C: s.toCharArray()) i;
System.out.println("Length: "
i);
}
}
Help us improve. Please let us know the company, where you were asked this question :