--%>

Explain If-else statement

If-else statement: It is a control structure employed to select between performing one of two alternative events.

    if(boolean-expression){
        // Statements performed whenever expression is true.
        ...
    }
    else{
        // Statements performed whenever expression is false.
        ...
    }

This is controlled by a Boolean expression.

   Related Questions in Programming Languages

  • Q : Write a program that initializes an

    Write a program that initializes an integer array a[20] with values {0, 1, 2, 3, ...18, 19 - once each} then scrambles them up and prints the values in random order. For example: 19 2 3 8 11 1 4 17 7 15 9 0 16 12 18 13 5 6 10 14    

  • Q : Explain Java Virtual Machine Java

    Java Virtual Machine (JVM): It is an idealized machine whose instruction set comprises of bytecodes. Java program is compiled to an equal bytecode form and performed on an interpreter that implements the JVM.

  • Q : What is a Port Port: It is a number

    Port: It is a number employed by a procedure to communicate with the other procedure across a network, employing the Transmission Control Protocol (abbreviated as TCP) or User Datagram Protocol (abbreviated as UDP), for instance.

  • Q : How does XML maintain white-space in

    How does XML maintain white-space in any documents?

  • Q : What is no-arg constructor no-arg

    no-arg constructor: It is a constructor which takes no arguments. By default, each and every class without an explicit constructor has a default no-arg constructor with the public access. Its role is entirely to invoke the no-arg constructor of the in

  • Q : Explain Global variable Global variable

    Global variable: It is a phenomenon which is more generally regarded as being a trouble in structured programming languages than in object-oriented languages. In structured programming language, like C or Pascal, a global variable is one stated outsid

  • Q : Overriding a base class method in

    Explain the way to overriding a base class method in Visual Studio .NET and in Visual Studio 2005.

  • Q : State the term tombstone lifetime

    State the term tombstone lifetime attribute?

  • Q : Illustrations of XML DTDs or schemas

    Give some illustrations of XML DTDs or schemas which you have?

  • Q : Why is Java pure object oriented

    Explain the reasons that Java is pure object oriented programming language.