English 中文(简体)
可否将外产阶级界定为静态的,并附上静态等级?
原标题:Can outer class be defined as static and enclose inner static class?
  • 时间:2012-04-13 15:52:03
  •  标签:
  • java
  • oop

把外产阶级定义为静态的,也存在于静态的阶层? 只需要一个外部和内部课程。 外部阶级是抽象的,封闭的阶级是固定的?

最佳回答

无,最高等级为固定等级。 班级宣言中的“静态”的含义是 only/em> 。 你们当然可以在一个抽象的课堂内有一个固定的课堂。

http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.1“rel=” JLS: 8.1.1 :

变体静态仅涉及成员类别(第8.5.1段),而不是高层或地方或匿名类别。

请注意,如果你想“只举一例”某类,那么你就应当把它变成一个完全分开的单一州,而不是影响集体申报本身的东西。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...