Either of those two ways is fine when you want to instantiate a static inner class from within its enclosing class. If you are going to instantiate a static inner class from outside the enclosing class, then you need to use the first form.
All code in my posts, unless a source is explicitly mentioned, is my own.