Is this a Nut?

Sjmarf@sh.itjust.works to Programmer Humor@programming.dev – 1274 points –
128

You are viewing a single comment

In Java, it's not called the Crackable interface.

It's the Nuttable interface.

Provided your method specifies a strongly bound type you can ensure that you get your nut.

void dischargeNut(T extends Nut) { ... }