How many threads are running? Is your program a console program, a Swing program, or something else?

If you sleep the only thread running, then you'll see the behavior you describe. If you sleep...