something I find funny everytime is that because J...
# random
k
something I find funny everytime is that because Java is so verbose by default, even the official docs have to resort to a compressed syntax that you would never see in real code. example: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html
Copy code
class Producer implements Runnable {
   private final BlockingQueue queue;
   Producer(BlockingQueue q) { queue = q; }
   public void run() {
     try {
       while (true) { queue.put(produce()); }
     } catch (InterruptedException ex) { ... handle ...}
   }
   Object produce() { ... }
 }
- no
public
on the class - constructor body in the same line as signature - single line
while
- single line
catch
- missing
@Overrides