Home > Java > javaTutorial > body text

Final class in Java

PHPz
Release: 2023-09-12 10:01:02
forward
738 people have browsed it

Final class in Java

#The main purpose of using a class declared as final is to prevent the class from being subclassed. If a class is marked final, no class can inherit any features from the final class.

public final class Test {
   // body of class
}
Copy after login

The above is the detailed content of Final class in Java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template