Find the length of a string without using inbuild function in Java

In this tutorial we are going to see how to get the length of any input string without using the length() function in Java.

Here is the code goes:

import java.util.Scanner;

public class lengthofstring {
     public static void