Q:

Java Program to implement Switch cases without break statement

0

Java Program to implement Switch cases without break statement.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.util.*;
import java.lang.*;
import java.io.*;

public class Example {  
     public static void main(String args[])
        {
           switch(1)
              {
                  case 0:System.out.println("a");  
                  case 1:System.out.println("b");
                  case 2:System.out.println("c"); 
              }
         }
   }

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now