Elementary | Middle
Middle | High
AI
Use Cases
Teaching
Tools
Explore our languages
Start a new project
Open a blank sandbox in any language.
Company
Community
Explore
Click on one of our programs below to get started coding in the sandbox!
View All
A substring is a smaller sequence of characters in a larger String. You can use the `substring` method to get a substring of a String in Java. ``` String str = "good day"; String sub1 = str.substring(0, 4); // sub1 will hold "good" ```