## 21+ Java Coding Questions on If-Else Statement

In this tutorial we will learn writing the code on if else statement in Java. This Coding questions will help you to improve you coding knowledge as well as it will help you to clear the concepts of if else statement.

Coding question on if-else conditional statement is also very important for interview preparation. Interviewers might ask you to write the code to check the concept of if-else in Java.

1. Java Program to print maximum among two numbers using if-else.
2. Java Program to print maximum among three numbers using if-else.
3. Java Program to check whether a given number is divisible by 3 or not using if-else.
4. Java Program to check whether a given number is divisible by 5 or not using if-else.
5. Java Program to check whether a given number is divisible by 11 or not using if-else.
6. Java Program to check whether a given number is even or odd using if-else.
7. Java Program to check whether a year is leap year or not using if-else.
8. Java Program to check whether a given input is digit or not using if-else.
9. Java Program to check whether a given input is alphabet or not using if-else.
10. Java Program to check if a given input is a Digit or Alphabets or Special Character using if-else.
11. Java Program to check whether a given number is a positive or negative number using if-else.
12. Java Program to convert temperature from Celsius to Fahrenheit using if-else.
13. Java Program to convert temperature from Fahrenheit to Celsius using if-else.
14. Java Program to check whether a character is a vowel or consonant using if-else.
15. Java Program to check whether a given character is uppercase or lowercase using if-else.
16. Java Program to print week day for a given input week using if-else.
17. Java Program to print number of days for a given input month using if-else.
18. Java Program to check whether a triangle is an equilateral, isosceles, or scalene triangle using if-else.
19. Java Program to check whether a person is valid for vote or not using if-else?
20. Java Program to check Division on the basis of marks obtained by students. Percentage >= 60% : Division 1, Percentage >= 45% : Division 2, Percentage >= 30% : Division 3, Percentage < 30% : Fail
21. Java Program to Calculate percentage and grade of students on the basis of marks obtained in 5 subjects Maths, Physics, Chemistry, English and Hindi. Marks of subject is taken as an input: Percentage >= 90% : Grade A, Percentage >= 80% : Grade B, Percentage >= 70% : Grade C, Percentage >= 60% : Grade D, Percentage >= 40% : Grade E, Percentage < 40% : Grade F