FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

package java_switchCase; import java.util.Scanner; /** * Example Application: Switch Case * * @author Felipe Fong */ public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter any numeric value: "); int option = in.nextInt(); switch (option) { case 0: // TODO System.out.println("Case: 0"); break; case 1: // TODO System.out.println("Case: 1"); break; default: // TODO System.out.println(String.format("Case: Default (value: %d)", option)); break; } } }

Back | FazBrowse Home | New Git URL