title: Printing the values in a reverse way in java
body: <p>I'm working on a question where I need to print the values in a reverse way using for loop in java.  I have tried using the while loop and the for loop but I'm not able to print the values till required.</p>
  
  <p>Please find my code below:</p>
  
  <p>Lets say: y=1000, w=150, z=100;</p>
  
  <pre><code>while(y&gt;=w) {
          y-=z;
          System.out.println(y);
      }
  </code></pre>
  
  <p>i need to print the values like:</p>
  
  <pre><code>1000
  900
  800
  700 and so on.
  </code></pre>
  
  <p>Kindly help as im new to Java.</p>