2020-9-15 Released JDK15
JDK15 There are altogether 14 New features , Among them, the most impressive thing for the author is that —— Sealed classes can be inherited

From the beginning, sealed classes have learned from various ways that they cannot be inherited , If you want to inherit a new version of the sealed class, you need to use permits Specifies the inherited class
meanwhile , Inherited classes need to use final,sealed perhaps non-sealed modification

A normal code idea
public class Person { } class Teacher extends Person { } // teacher class Student
extends Person { } // student class MiddleSchoolStudent extends Student { } // middle school student
class GraduateStudent extends Student { } // graduate student class Worker extends Person{ }
// worker class RailWayWorker extends Worker{ } // Railway workers
If Person add sealed You'll report a mistake
public sealed class Person { } class Teacher extends Person { } // teacher class
Student extends Person { } // student class MiddleSchoolStudent extends Student { }
// middle school student class GraduateStudent extends Student { } // graduate student class Worker extends
Person{ } // worker class RailWayWorker extends Worker{ } // Railway workers
In this case, if you want the sealed class to be inherited, you need to use the permits Specifies the inherited class , If the inherited class has no final,sealed perhaps non-sealed It's also a mistake
public sealed class Person permits Teacher,Student,Worker{ } final class
Teacher extends Person { } // teacher sealed class Student extends Person permits
MiddleSchoolStudent,GraduateStudent{ } // student final class MiddleSchoolStudent
extends Student { } // middle school student final class GraduateStudent extends Student { } // graduate student
non-sealed class Worker extends Person{ } // worker class RailWayWorker extends
Worker{ } // Railway workers
You can see , Classes that inherit sealed classes ,
If it's a sealed class, you need to inherit , Also need to be specified
If it's an unsealed class , It can be used normally , Normally inherited .

alas , Sealed classes can be inherited , Subvert my three views since I learned code

Technology
©2020 ioDraw All rights reserved
python gui Interface examples -Python GUI Programming complete example IO flow —— Classification of flow ,InputStream,OutputStream,Reader,Writer etc. Thread.setDaemon Set up the Daemons STM32 RS485 modbus Communication source program , The test is effective stay MATLAB 2018 Time series prediction with deep learning vue3 Write component library and publish to npm The process of Questions and answers for the interviewer : How did you get a project in the project team ??? In the applet form Multiple cycles input How to get each input Value of 2021 Front end high frequency interview questions ( You have to watch it !!!)js Array method