substring of a string in java

How to get a SubString of a String in Java

This is a tutorial in which we are going to create a program that gets substring of a string in java. We all know that a substring is a part of a sentence or a string. Java String class provides substring method with some overloaded parameter. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of subString.java. 2. Import java.lang package because in this library, substring class is there.