Last active
October 15, 2019 12:21
-
-
Save gauravkukade/728a781f09d0346e8c7d835a58b32f49 to your computer and use it in GitHub Desktop.
A Java program to explain the substring() method. This example is used in a blog at https://coderolls.com/java-substring-method
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
/** | |
* A Java program to explain the substring() method. | |
* | |
* @author Gaurav Kukade at coderolls.com | |
* | |
*/ | |
public class SubstringExample { | |
public static void main(String[] args) { | |
String name = "coderolls.com"; | |
String result = name.substring(4); | |
System.out.println(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment