应该是这样吧
int pw; Scanner in=new Scanner(System.in); do { System.out.println("输入密码"); pw=in.nextInt(); } while (pw!=); System.out.println("请进");