how to make Java simple program if else
Answers
Answered by
2
Answer:
Here is a code:
class If Statement {
public static void main(String[] args) {
int number = 10;
if (number > 0) {
System.out.println("Number is positive.");
}
System.out.println("This statement is always executed.");
}
}
Explanation:
Similar questions