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 ::
need an explanation for this answer? contact us directly to get an explanation for this answer