-3
即時通訊只是想知道是否有任何轉到或繼續命令爲if語句? 即時使用繼續;但它不適用於if語句。是否有任何goto命令或繼續命令爲If語句??? JAVA
if (typess == 1){
***OUTER:***
System.out.println("Type: Current Minimum of 1000.00 ");
System.out.print("Amount: ");
currenttype = Float.parseFloat(in.readLine());
if (currenttype >= 1000){
balance += currenttype;
System.out.print("Successful " + currenttype + " Added to your Account");
}
else
{
**continue OUTER;**
System.out.print("MINIMUM IS 1000.00 ");
}
什麼?你能否讓代碼更清楚(格式化並明確問題的出處) – ItamarG3
你想要發生什麼?即使條件爲假,你是否還想執行if子句?這沒有什麼意義。看起來你可能需要一個循環。 – Eran
你所描述的'去'可以/必須用方法來解決。每當輸入無效時,您都會遞歸地調用它。 – SomeJavaGuy