Created
April 11, 2017 13:38
-
-
Save coderpr/ee76449d73a6a03c7a531b9dff6c9169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author prlabs | |
* | |
*/ | |
class example{ | |
public static void main(String args[]){ | |
char color = 'd'; | |
switch(color){ | |
case 'r' : System.out.println("Red"); | |
case 'g' : System.out.println("green"); | |
case 'w' : System.out.println("White"); | |
case 'b' : System.out.println("blue"); | |
default : System.out.println("No Have Color"); | |
} | |
} | |
} | |
/* change your class name and run the program */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment