Home » Online Computer Education » Learn Fundamentals of Java Programming “Selection Structures in Java Programming ” Lesson 8

Learn Fundamentals of Java Programming “Selection Structures in Java Programming ” Lesson 8

Selection Structures

In real life, you often select your actions based on whether a condition is true or not. For example, if it is raining outside, you carry an umbrella, otherwise not.

Java fundamentals  flow control 1

Similarly in a program, you may want to execute a part of the program based on the value of an expression. Java provides two statements – the if else statement and the switch statement for executing a block of code conditionally (A block of code is a sequence of statements enclosed in curly braces).

About

The main objective of this website is to provide quality study material to all students (from 1st to 12th class of any board) irrespective of their background as our motto is “Education for Everyone”. It is also a very good platform for teachers who want to share their valuable knowledge.

Leave a Reply

Your email address will not be published.