Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Find Length of String using length()

import java.util.Scanner;

public class CodesCracker
{
   public static void main(String[] args)
   {
      Scanner scan = new Scanner(System.in);
      
      System.out.print("Enter the String: ");
      String str = scan.nextLine();
      
      int len = str.length();
      System.out.println("
Length of String = " +len);
   }
}
Source by codescracker.com #
 
PREVIOUS NEXT
Tagged: #Find #Length #String
ADD COMMENT
Topic
Name
3+4 =