Skip to content

Instantly share code, notes, and snippets.

@MrRahulR
Created June 5, 2021 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrRahulR/1e72b0a0228741480da2af189192e5b6 to your computer and use it in GitHub Desktop.
Save MrRahulR/1e72b0a0228741480da2af189192e5b6 to your computer and use it in GitHub Desktop.
StringLength.java
public class StringLength {
public static void main(String[] args) {
String hello = "hello";
int myString = "hellostring".length();
System.out.println(hello.length());
System.out.println(myString);
}
}
/*
Output :
5
11
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment