Check out example codes for "else statement java". It will help you in understanding the concepts better.
Code Example 1
int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
} else {
// block of code to be executed if the condition is false
}
Code Example 2
int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
}
Learn ReactJs, React Native from akashmittal.com