Computer Science, asked by remya275, 7 months ago

Question 1:

What is the difference between:
a. / and %
b. = and ==
c. Math.ceil() and Math.floor() methods
d. Prefix and postfix operators
e. print() and println() methods​

Answers

Answered by Anu1612
2

a. / stands for divison and gives quotient after divison.It is executed before  modulus or mod.

  % stands for modulus or mod and gives remainder after divison.It is executed after divison.

b. = is an assignment operator.It is used to assign a constant value to a variable.

== is a relational operator.It is used to check whether a given constant or value is same as another given variable or constant.

c.Math.ceil() returns the smallest integer which is greater than the argument.

  Math.floor() returns the largest integer which is less than the argument.

d. prefix operators: when the increment or decrement operators are applied before the operand,they are known as prefix operators.They work on the principle of 'CHANGE BEFORE ACTION'.

postfix operators:when increment or decrement operators are applied after the operand ,they are known as postfix operators.They work on the principle of 'CHANGE AFTER ACTION'.

e.print() methods prints the given statement in one single line and continues to do so if the method is found again.

println() method prints the given statement in one line and after printing the statement makes the control print from second line.

plz plz mark me as the brainliest.

Similar questions