[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/fefong/java_switch/master/src/java_switchCase/Main.java [Back]  [Original]

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;

		}
		
	}

}

Web Proxy Viewer  |  New URL  |  Original Page