it from any other language I know.
new SomeClass.SomeMemberOrSubClassIDontKnow () {
// code
}
What is this?
What is the name of this syntax pattern?
there is an inner class in SomeClass
This is nested static class. In java docs they differentiate terms "inner" and "nested", and I may be intermixing them, but the real difference: one type is static, another ones are not. Static nested classes are used way much often. I can't remember that I've ever seen non-static ever in some real world projects. Assuming this is a *static* inner class, basically outer class serves as a namespace for the inner class. Nothing more. Examples: if (packet.type == SipPacket.Type.HANDSHAKE) { ... status = Http.Status.OK If you're talking about non-static inner classes (whatever they are officially called), this is another story
Обсуждают сегодня