how to find all the substrings of a string in java code example
Example: find all possible substrings of a string java
for (int i = 0; i < A.length(); i++) {
for (int j = i+1; j <= A.length(); j++) {
System.out.println(A.substring(i,j));
}
}