如何使用我if在if块外的语句中声明的变量?
if
if(z<100){ int amount=sc.nextInt(); } while(amount!=100) { //this is wrong.it says we cant find amount variable ? something }
java
java ×1