--%>

Explain Switch statement

Switch statement: It is a selection statement in which the value of an arithmetic expression {expression!arithmetic} is compared for the match alongside different case labels. When no match is found, the optional default label is chosen For example:

    switch(choice){
         case 'q':
             quit();
             break;
         case 'h':
             help();
             break;
         ...
         default:
             System.out.println("Unknown command: "+choice);
             break;
    }

   Related Questions in Programming Languages

  • Q : What is Bounded repetition Bounded

    Bounded repetition: The Repetition where statements within a loop's body are executed a fixed number of times and the number of times is established whenever the loop began. There is no control structure in Java which guarantees the bounded repetition

  • Q : Define the term Arpanet Define the term

    Define the term Arpanet: It is a network which was a forerunner of the global Internet.

  • Q : Main uses of Virtual memory Illustrate

    Illustrate the main uses of Virtual memory?

  • Q : Define the term Trusted applet Define

    Define the term Trusted applet: It is an applet with additional privileges than an ordinary (that is, untrusted) applet.

  • Q : Define the term Garbage collector

    Garbage collector: It is a daemon thread which recycles objects to which there are no extant references in a program.

  • Q : Perform Exception Handling with

    On occasion, some of Brewbean’s customers mistakenly leave an item out of a basket already checked out, therefore they create a new basket containing the missing items. Though they request that the baskets be combined and hence they are not charged extra shippin

  • Q : Explain Multiple inheritance Multiple

    Multiple inheritance: The capability of a class or interface to expand more than one interface or class. In Java, multiple inheritance is only accessible in the circumstances which are shown below: An interf

  • Q : Examples for 8 -16 - 32 bit

    Normal 0 false false

  • Q : Define the term Host system Define the

    Define the term Host system: It is a computer system on which a process is executed or run.

  • Q : Write a program that prints out all

    Write a program that prints out all prime numbers between 1 and 1000. Print the values out ten per line, with digits lined in proper columns.