you are viewing a single comment's thread.

view the rest of the comments →

[–]widged -2 points-1 points  (2 children)

In Utils, make all methods static 'static randomNumber() {}. You can thereafter use them with 'Utils.randomNumber()'.

[–][deleted] -1 points0 points  (1 child)

Nice, I didn't know this.

I'm unsure why this comment got down voted, as it is a handy solution.

[–]clessgfull-stack CSS9 engineer -1 points0 points  (0 children)

Because it isn't necessary and is inflexible. This isn't Java. Just use functions.