Task 4 of 9 · 0 solved · 9 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

4.5 Static and toString — static utility method

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Write a static method square(int n) in MathUtil that returns n * n.

Because it is static, main calls it on the class itself — MathUtil.square(6) — without ever building an object. The program prints 36.

Your solution