Write a program in Java to find result of expression a%b
Answers
Answer:
Evaluate Java expressions with operators
A complete guide to the Java operator types and writing Java expressions in Java 12
question marks
Véronique Debord-Lazaro (CC BY-SA 2.0)
Java applications process data by evaluating expressions, which are combinations of literals, method calls, variable names, and operators. Evaluating an expression typically produces a new value, which can be stored in a variable, used to make a decision, and so on.
In this tutorial, you will learn how to write expressions for your Java programs. In many cases you'll use operators to write your Java expressions, and there are many types of operators to know how to use. I'll briefly introduce Java's operator types (including the additive, bitwise, logical, conditional, shift, and equality types) and their operands. You'll also learn about important concepts such as operator overloading and operator precedence, and you'll see a demonstration of primitive-type conversion. I'll conclude with a small Java program that you can use to practice primitive-type conversions on your own.
Hope This will help you in writing a program in java to find result of expression (a)persent(b)