Computer Science, asked by arjitakarmakar2006, 9 months ago

write a java program of your choice using if else. give output also

Answers

Answered by Avnein4988
1

Answer:

class IfStatement {

public static void main(String[] args) {

int number = 10;

// checks if number is greater than 0

if (number > 0) {

System.out.println("The number is positive.");

}

System.out.println("This statement is always executed.");

}

}

Attachments:
Similar questions