What is the difference between'/' and '//'operator?
Answers
Answered by
1
Answer:
These operators are mathematical operators and both have different uses. / Only perform the division operation in mathematics and returns results as the quotient, while % is known as modulus. ... / divides and returns the answer.
Answered by
0
Answer:
Both / and % are two different operators used in Java. These operators are mathematical operators and both have different uses. / Only perform the division operation in mathematics and returns results as the quotient, while % is known as modulus.
Explanation:
/ divides and returns the answer.
Example : 8/2 = 4
% divides and returns the remainder.
Example: 13 % 2 = 6 and reminder is 1.
Similar questions