Created
November 4, 2017 13:02
-
-
Save visparashar/0a0d94ed32412e7089029fe04eef5e8c to your computer and use it in GitHub Desktop.
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
import java.util.ArrayList; | |
import java.util.List; | |
public class AllSubString { | |
public static void main(String[] args) { | |
String str ="noeik"; | |
getAllSubString(str); | |
} | |
public static void getAllSubString(String str) { | |
List arrList = new ArrayList(); | |
for(int i = 0;i<str.length();i++) { | |
for(int j=i+1;j<=str.length();j++) { | |
System.out.println(str.substring(i, j)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment