SyntaxFix
Write A Post
Hire A Developer
Questions
try below code
public static int Length(String str) { str = str + '\0'; int count = 0; for (int i = 0; str.charAt(i) != '\0'; i++) { count++; } return count; }