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.
- Java Program to print maximum among two numbers using if-else.
- Java Program to print maximum among three numbers using if-else.
- Java Program to check whether a given number is divisible by 3 or not using if-else.
- Java Program to check whether a given number is divisible by 5 or not using if-else.
- Java Program to check whether a given number is divisible by 11 or not using if-else.
- Java Program to check whether a given number is even or odd using if-else.
- Java Program to check whether a year is leap year or not using if-else.
- Java Program to check whether a given input is digit or not using if-else.
- Java Program to check whether a given input is alphabet or not using if-else.
- Java Program to check if a given input is a Digit or Alphabets or Special Character using if-else.
- Java Program to check whether a given number is a positive or negative number using if-else.
- Java Program to convert temperature from Celsius to Fahrenheit using if-else.
- Java Program to convert temperature from Fahrenheit to Celsius using if-else.
- Java Program to check whether a character is a vowel or consonant using if-else.
- Java Program to check whether a given character is uppercase or lowercase using if-else.
- Java Program to print week day for a given input week using if-else.
- Java Program to print number of days for a given input month using if-else.
- Java Program to check whether a triangle is an equilateral, isosceles, or scalene triangle using if-else.
- Java Program to check whether a person is valid for vote or not using if-else?
- 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
- 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