Glorified classes in the Java language

前端 未结 13 1839
一生所求
一生所求 2021-01-29 20:32

Some classes in the standard Java API are treated slightly different from other classes. I\'m talking about those classes that couldn\'t be implemented without special support f

13条回答
  •  一生所求
    2021-01-29 21:07

    1. Enum. You're not allowed to subclass it, but the compiler can.
    2. Many things under java.util.concurrent can be implemented without JVM support, but they would be a lot less efficient.

提交回复
热议问题