title: Declaring class level variables JAVA
body: <p>Is it possible to declare a class level variable from within a method?</p>
  
  <p>I'm simply trying to create a static counter, but I only want to create it if needed.  The class calling it should live longer than the function itself. </p>
  
  <p>My need for this is rare, but I'm interested if it would work. </p>