I recently received this lovely coffee mug as part of the 10M questions celebration.
The side of the mug looks like this:
if(owner.isCoding()
&& mug.isEmpty())
{mug.fill('coffee');}
I'm not a Java programmer, but I'm guessing this is Java syntax and that this is something of a pun given that "Java" is a nickname for coffee, at least in dated American slang.
However, given that we don't see the class declarations for owner
and mug
, I'm guessing it could also be C++; perhaps it's deliberately ambiguous.
I like the mug but I sort of feel like a poseur carrying it around since I don't use either of these languages. So I would appreciate some info, particularly if there's an inside joke I'm not getting. Is there any significance in brackets being on the same line instead of:
if( owner.isCoding()
&& mug.isEmpty() ){
mug.fill('coffee');
}
(I understand there may be a line limit for the printable area on the mug.)
mug.fill('coffe')
withtry { } catch (CupOverflowException e) {}
or declarethrows CupOverflowException
on the method that runs the code :). Though I would love to have this cup and drink coffee from it in front of my colleagues :D.