What is the result of `Math.floorDiv(-7, 2)` in Java?

Java Professional Easy

Java Professional — Easy

What is the result of `Math.floorDiv(-7, 2)` in Java?

Key points

  • Math.floorDiv() returns the largest integer less than or equal to the division result.
  • Negative numbers are rounded towards negative infinity.
  • The result is always an integer value.

Ready to go further?

Related questions