Does Java have a floor division operator?

26th Jul 2020, 3:19 AM
Coding coder
Coding coder - avatar
2 Answers
+ 8
26th Jul 2020, 3:25 AM
Anis - avatar
- 1
/ (division operator) in java. This can applied according to your need in java. int/int = int. If any one is double or float, it result in double.. You can use type casting the result to int type. Or use floor(x/y). Or just store in needed type.
26th Jul 2020, 10:59 AM
Jayakrishna 🇮🇳