length - Returns the length of the string. in Java

String: To store the Contents to use in the program.
length(): To find the total charcter in the given string.
AccessModifier int VariableName =StringVariable.length();
public String a="forgercode";
int b=a.length();

import java.lang.*;
class ForgetCode
public static void main(String args[])
String forget="www.forgetcode.com";
System.out.println("A Syntax warehouse site:"+forget);
int a=forget.length();
System.out.println("Length of the string:"+a);