Last active
June 5, 2021 14:06
-
-
Save MrRahulR/b47efb070fec919d526379bdf09a4ab6 to your computer and use it in GitHub Desktop.
StringCreation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringCreation { | |
public static void main(String[] args) { | |
String greeting = "Hello"; | |
int count = greeting.length(); | |
System.out.println("Length is " + greeting.length()); | |
System.out.println(count); | |
} | |
} | |
/* | |
Output : | |
Length is 5 | |
5 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment