Please help, novice!

Write an application using the while loop that displays even integers from 20 to 0, then displays the results in a message dialog.My question is basic: how do I get the loop to output only even numbers?
[216 byte] By [Rocky_la] at [2007-10-2 1:40:30]
# 1
Duplicate of http://forum.java.sun.com/thread.jspa?threadID=670031
ChuckBinga at 2007-7-15 19:04:06 > top of Java-index,Java Essentials,New To Java...
# 2
int a, b, c ;a = 1 ;b = 2 ; c = 48 ;if (c%2 == 0)System.out.println("if") ;elseSystem.out.println("else") ;An even number is dividable by 2. Thus test (c%2 == 0)to see if it is even.KR Ylva Wandel
ylvawandela at 2007-7-15 19:04:06 > top of Java-index,Java Essentials,New To Java...
# 3

ylvawandel, thanks for helping--your sample code is indeed correct. :)

But, please keep in mind that if someone says that a thread is a duplicate and posts a link to the other copy, as ChuckBing did in the first reply, the intention is for this thread to be abandoned, so that replies don't get duplicated, and all answers go in the same place. Duplicating replies wastes the time of everyone here--both the people trying to answer and the people who are asking the questions. Next time you see something like this and want to reply, please add the reply to the linked thread instead. :)

This is not intended to be an insult to you (sometimes people take things the wrong way here)--it is just standard advice for everyone using the forum. You are obviously new here (from your registration date and number of posts), and you are certainly quite welcome to post both questions and answers here.

Have a great day!

MLRona at 2007-7-15 19:04:06 > top of Java-index,Java Essentials,New To Java...
# 4
OP, who are you calling a novice?
YAT_Archivista at 2007-7-15 19:04:06 > top of Java-index,Java Essentials,New To Java...