3.内部类可以用在不是嵌套他的其他类中吗?
Objects of an inner class are often created in the outer class. But you can also create an object of an inner class from another class. If the inner class is nonstatic, you must first create an instance of the outer class, then use the following syntax to create
an object for the inner class:
OuterClass.InnerClass innerObject = outerObject.new InnerClass();
If the inner class is static, use the following syntax to create an object for it:
OuterClass.InnerClass innerObject = new OuterClass.InnerClass();