Java Program:

- To find the string length

Example:

User Input: Hello World

Output: 11

import java.util.Scanner;
public class StringLength  {
  public static void main(String []args) {
    String s1;
    Scanner userInput = new Scanner(System.in);
    System.out.print("Enter Your string : ");
    s1 = userInput.nextLine();

    System.out.println("String length : "+s1.length());
  }
}

Output:

  Enter your string : Blue Sky
  String length : 8
Program
basic
s1.length()

Use length() method to find any string length

Concept

Coming Soon !

Quick
Tutorial

Quote

We are all now connected by the Internet, like neurons in a giant brain.