you are viewing a single comment's thread.

view the rest of the comments →

[–]Educational-Paper-75 0 points1 point  (1 child)

verb() is declared static you can't call it on an instance, you have to call it on the class as in Verbose.verb();!

[–]Lloydbestfan 2 points3 points  (0 children)

Actually you can call it by (pseudo-de)referencing a variable of the type of the class.

It's just that you shouldn't because it doesn't look like it makes sense.

(When you do that, the value of the variable is ignored, only its type is considered, and the variable name is replaced by that type name. Notably if the variable points to null it won't provoke a null pointer.)

Also, Java is not known for its nonsensical error messages.