# 003public class Switch-case 上課test { public class xxx { public static void main(String[] args) { int n=10;//10 20 30 switch(n){ case 10: System.out.println("n的值是10"); break; case 20: System.out.println("n的值是20"); break; default: System.out.println("n的值不是10也不是20"); } System.out.println("我仍有執行到"); } } 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up