This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Print the numbers in Descending order

 
kri shan
Ranch Hand
Posts: 1462
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class hai {
public static void main(String args[]) {
for( int j=90;j<=60;j--)
System.out.println("j value..."+j);
}
}
It doesn't print the value. Why ???
 
Raj Young
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you change the condition like j > 60 to print the values in descending order from 90.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic