If I have a 7 word String (`I like it when it rains hard`) and I want to print every variation of it that is 

* a) Greater than two words

and

* b) Not changing the original word order.

How best to do that? I'll print below what my end-goal is :

```
 I like it when it rains hard 
 I like it when it rains 
 I like it when it 
 I like it when 
 I like it 
 I like 
 like it when it rains hard 
 like it when it rains 
 like it when it 
 like it when 
 like it 
 it when it rains hard 
 it when it rains 
 it when it 
 it when 
 when it rains hard 
 when it rains 
 when it 
 it rains hard 
 it rains 
 rains hard 

```

My Program is almost achieving that but not quite and I wonder if there is a smarter way of tackling it than what I have... ?

```
//Strings.java
//Goal: to print out each possible version of data without changing the original   
//order and without printing strings of less than 2 words.

public class Strings  {

  public static void main (String[] args)  {

  String var = " ";
  String data = "I like it when it rains hard";

  String [] s = data.split(" ");

  for (int i = 0 ; i <= s.length-1 ; i++)  {  //inner

    for (int j = s.length-1 ; j >= 1 ; j--)  {  //outer

      for ( int num = i ; num <= j ; num++)  {  

          var += s[num] + " ";        
      }
       System.out.println(var);
       var = " ";
    }     
  }

  }
}

```