Could anyone check my code and see why my loop does not work?
<pre><code>import java.util.Scanner;

public class asg3 {

    public static int setoriginal() {
        int d=0; 
        int l=0;                                                           
        do {   
            Scanner input = new Scanner(System.in);
            System.out.println("Please enter a 4 digit number: ");
            d=input.nextInt();
            if (d&lt;=9999 || d&gt;999) {
                break;
            } else {
                System.err.printf ("You did not enter 4 digits\n");
            }           
            l=l+1;
        } while (l&lt;3);    
        return d;
    }

    public static void main(String[] args) {
        setoriginal();
    }
}
</code></pre>

<p>when i enter 12345 it works, but doesnt seem to work for any other number other than four digit ones.
any idea of what could be wrong or what i am doing wrong? thanks in advance guys!</p>
