specific values in loops

From: Danny Gopie (ouygiytf_at_jhgvkuy.nl)
Date: 11/29/04


Date: Mon, 29 Nov 2004 20:17:39 +0100

Hello

I want to print only the values in this loop that are smaller then the give
value "aantal"

Now it just print true, becoz System.out.println(a < aantal); is a boolean.
But how do i change this?

Danny

public class e211 {
 public static void main(String[] args) {

 String saantal = JOptionPane.showInputDialog(null,"Voer een getal
in","invoer getal",JOptionPane.QUESTION_MESSAGE);
 int aantal = Integer.parseInt(saantal);

 for ( int i = 0; i < 10; i++) {
     int a = i * aantal;
     if (a < aantal){
         System.out.println(a < aantal);}

}
 }}