if else program in java
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
}int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
}int a=10;
if(a>5){
// block of code to be executed if the condition in true
}
else{
// block of code to be excuted if the condition in false
}int Java = 15
int Javascript = 13
if (Java > Javascript) {
System.out.println("Java is greater than Javascript");
}
Also in Java:
- java console write
- goodbye java
- java cast duration to long
- pascals triangle java
- java how to change the length of an array
- how to create a subclass in java
- join two lists java
- gravity in java
- java function for power
- remove first character from string
- armstrong number in java
- how to do 4th root java
- system.out.println shortcut
- java create directory
- when super add by constructor in java
- how to create a linked list in java
- waht does&& mean in java
- treemap get order java
- how to input in java
- java new string array
- java observable to observer stack overflow
- java how to convert string to int
- create color object java
- threadsafe singleton pattern in java