Saturday, May 22, 2021

If Statement in Java

 In this article, I will discuss how to declare and use if statements in the Java programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* If_Statement.java

 * Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

 * www.jakerpomperada.com www.jakerpomperada.blogspot.com

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental Philippiens

 */


public class If_Statement {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

    System.out.println();

        System.out.print("\tIf Statement in Java ");

        System.out.println("\n");

        int a=500;

        int b=200;

        if (a>b) { // if true, run the next command

        System.out.print ("\tA is greater than B in terms of numerical value.");

        }

        System.out.println("\n");

        System.out.print("\tEnd of Program");

        System.out.println();

}


}



No comments:

Post a Comment