while(true){ //Zahl zw. 0 und 1000 zahl=generator.nextInt(1000); if (zahl ==0) //keine Null continue;}