Search This Blog

UI/UX Design | Web Development | Mobile Application Development

Whether you need UI/ UX design, web development services, or mobile app development services, Qaabil Digitals will be more than happy to help you. We work with top software developers, designers, and project managers. We tailor our services to suit your exact needs. We closely look at your company, listen to your story, and bring about the best ideas and solutions that can help you drive solid results. We don’t just produce work that works. We produce work that matters. Get a quote now Or Talk to us

Sunday 26 June 2011

Java program using nested switch


import java.util.*;
class nswitch
{
public static void main (String arg[])
{
Scanner in = new Scanner (System.in);
int a,b;
a=3;
b=2;
switch (a)
{
case 1:
switch (b)
{
case 1:
System.out.println ("\n\t Inner One ");
break;
case 2:
System.out.println ("\n\t Inner Two ");
default:
System.out.println ("\n\t Inner :: Invalid ");
}
case 2:
System.out.println ("\n\t Outer Two ");
break;
case 3:
System.out.println ("\n\t Outer Three ");
break;
default:
System.out.println ("\n\t Outer :: Invalid ");
}

}
}

1 comment:

Share