Source Code : Using the switch Statement

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Using the switch Statement

<HTML>
  <HEAD>
    <TITLE>Using the switch Statement</TITLE>
  </HEAD>

  <BODY>
    <H1>Using the switch Statement</H1>
    <%
        int day = 3;

        switch(day) {
            case 0:
                out.println("It's Sunday.");
                break;
            case 1:
                out.println("It's Monday.");
                break;
            case 2:
                out.println("It's Tuesday.");
                break;
            case 3:
                out.println("It's Wednesday.");
                break;
            case 4:
                out.println("It's Thursday.");
                break;
            case 5:
                out.println("It's Friday.");
                break;
            default:
                out.println("It must be Saturday.");
        }
    %>
  </BODY>
</HTML>

           
       

Thank with us