• 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