| java Programming Glossary: dosomestuffWhy do I get an Enum constant reference cannot be qualified in a case label? http://stackoverflow.com/questions/2663980/why-do-i-get-an-enum-constant-reference-cannot-be-qualified-in-a-case-label  to compile while changing the case statement to case ENUM1 doSomeStuff works public enum EnumType ENUM1 ENUM2 ENUM3 void doSomeStuff.. works public enum EnumType ENUM1 ENUM2 ENUM3 void doSomeStuff  switch this  case EnumType.ENUM1 doSomeStuff    java enums.. ENUM3 void doSomeStuff  switch this  case EnumType.ENUM1 doSomeStuff    java enums   share improve this question   This is to avoid.. 
 Why doesn't Java allow generic subclasses of Throwable? http://stackoverflow.com/questions/501277/why-doesnt-java-allow-generic-subclasses-of-throwable  not reifiable which is a problem in the following case try doSomeStuff catch SomeException Integer e ignore that catch SomeException.. 
 Calling System.exit() in Servlet's destroy() method http://stackoverflow.com/questions/546097/calling-system-exit-in-servlets-destroy-method  private boolean keepGoing true protected abstract void doSomeStuff protected abstract void probablySleepForABit protected abstract.. keepRunning false public void run while keepGoing  doSomeStuff  probablySleepForABit  this.cleanup  It's also worth noting.. 
 Is a finally block without a catch block a java anti-pattern? http://stackoverflow.com/questions/601152/is-a-finally-block-without-a-catch-block-a-java-anti-pattern  in troubleshooting some code that looked like this try doSomeStuff doMore finally doSomeOtherStuff The problem was difficult to.. The problem was difficult to troubleshoot because doSomeStuff threw an exception which in turn caused doSomeOtherStuff to.. did not have a handle on the first exception thrown from doSomeStuff which was the real root cause of the problem. If the code had.. 
 difference between synchronizing a static method and a non static method http://stackoverflow.com/questions/6367885/difference-between-synchronizing-a-static-method-and-a-non-static-method  b new Object ... synchronized a doStuff ... synchronized b doSomeStuff ... synchronized a doOtherStuff In the above example a thread.. doStuff . However a thread could enter the block around doSomeStuff without a problem as that is synchronized on Object b not Object.. 
 Android Performance - 'Avoid Internal Getters/Setters' http://stackoverflow.com/questions/6716442/android-performance-avoid-internal-getters-setters  This would be private if I was using a getter public void doSomeStuff if innerObject Within class access like this  ....  public Object.. 
 |