Looking for IGNOU MCA MCS 024 assignment solved answer key of 2018-2019? Check out the solution of MCS 024 question 1c - Write a program to explain use of Relational and Boolean operators in java.
Objective
You will learn about the following in this guide / study material.
Answer of MCA MCS 024 1c question - Write a program to explain use of Relational and Boolean operators in java.
MCS 024 solved assignment 2018-19 Question 1c - Write a program to explain use of Relational and Boolean operators in java.
Relational Operators
Following are the various relational or comparison operators available in Java programming language.
- Greater than (>)
- Greater than or equal to (>=)
- Less than (<)
- Less than or equal to (<=)
- Equal to (==)
- Not equal to (!=)
Boolean operators of Java programming language
Following are the various boolean operators available in Java programming language.
- Conditional AND (&&)
- Conditional OR (||)
- Boolean NOT (!)
- Boolean AND (&)
- Boolean OR (|)
- Boolean XOR (^)
Java program to explain use of relational and boolean operators
[code]
//Sample java program to evaluate grading of student
public class grade
{
public static void main(String args[])
{
int total=55;
char grade;
if(total<40)
grade='F';
else if(total >= 40 && total < 60)
grade = 'S';
else
grade = 'T';
System.out.println("Grade = "+grade);
}
}
//End of the program
[/code]
Output of the program
Grade = S
So here was the fully solved IGNOU MCS 024 assignment 2018-19 question 1c.