Declaring static member variables in an inner class

Possible only if they are final. Non-final member variables will generate a compile-time error.
See Java Language Specification 8.1.2.

Static inner classes are nested classes. You can have static member variables in static inner classes.

Main.java:

public class Outer
{
   class Inner {
      static final int a = 10;     // OK 
      static int b = 20;           // compile-error
   }
 
   static class StaticInner {
      static final int c = 10;     // OK
      static int d = 20;           // OK
   }
}