Write a Java program to find and display all substrings in string

By | 09.02.2017

Java program to find and display all substrings


This program find all substrings of a string and the prints them.

For example substrings of “cat” are :- “c”, “ca”, “cat”, “a”, “at” and “t”. substring method of String class is used to find substring.

Java code to print substrings of a string is given below.

 

SOURCE CODE ::

 

OUTPUT ::

 

 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments