Advertisement
virtualideaz

Switch Statement

Oct 23rd, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. //
  2. //this is a decision control statement example
  3. //
  4. public class DecisionControlStatements {
  5.     public static void main(String [] args) {
  6.         //the switch statement
  7.    
  8.         int a = 100;
  9.        
  10.         switch (a)
  11.         {
  12.             case 90 : System.out.println("You passed");
  13.             default : System.out.println("Very Good");
  14.         }
  15.     }
  16. }
  17.  
  18. --copy until here--
  19.  
  20. OUTPUT:
  21.  
  22. Very Good
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement