欢迎光临
我们一直在努力

Java Programming Chapter 4——Methods and classes decorated by final

Methods and classes decorated by final

1.Final can be used to decorate methods.

2. Methods decorated by final can be inherited, but they are not allowed to be overwritten.

3.final can be used to decorate classes.

4. Classes decorated by final are not allowed to be inherited, that is, there are no subclasses.

5. Common final decorated classes: System, String, Math.

赞(0)
未经允许不得转载:171主机测评 » Java Programming Chapter 4——Methods and classes decorated by final
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址