Hey all,
We all know that Java is the best language ever and it always makes absolute syntactic and semantic sense, but occasionally I'll come across some syntax that makes me say, "huh?".
These often turn out to be awesome learning exercises, showing functionality I didn't know about before.
So I'd love to hear about syntax that threw you off or made you say "wtf, is this even Java...". I'll start with a few of mine.
The first one is pretty basic, operating on an array returned from a method directly instead of using a variable to reference the array first:
Specifically, I had to think about this line for a second before realizing what was going on:
System.out.println(getArray()[2]);