Safe divide

Java Easy 4 views
Back to Questions
Next Validate positive input Easy N

Problem Description

Task: divide a by b and throw ArithmeticException when b is 0.

Input Format

Java method

Output Format

Return value

Constraints

Do not return default value on error.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next