Java 中的重要关键词
- 摘要:适用于类和方法的非访问修饰符。它用于实现抽象。更多信息,请参考 java 中的抽象关键字
- 枚举:用于在 Java 中定义枚举
- instanceof : 用于知道对象是否为指定类型(类或子类或接口)的实例。
- private : 是访问修饰符。任何声明为私有的东西都不能在它的类之外看到。
- protected : 如果您希望允许在当前包之外看到一个元素,但只允许看到直接子类化您的类的类,那么请声明该元素受保护。
- 公共:任何声明为公共的东西都可以从任何地方访问。
有关访问修饰符的更多信息,请参考 Java 中的访问修饰符
- Static: It is used to create a member (block, method, variable, nested class) that can be used by itself without referring to a specific instance. For more information, please refer to static keyword in java.
- Strict FP: It is used to limit floating-point calculations and ensure the same results on each platform when performing operations in floating-point variables. See more strict FP keyword in java.
- [T0】 synchronized: 【T1] Applicable to blocks and methods. It is used to get synchronization in java. Please refer to [Synchronized 【T3] in Java for more information.](https://www.geeksforgeeks.org/synchronized-in-java/)
- [t0 T0】 transient: transient is a variable modifier used in serialization . When serializing, if we don't want to save the value of a specific variable in the file, then we use the transient keyword. Refer to transient keyword in Java for more information.
- volatile : The volatile modifier tells the compiler that variables modified by volatile can be accidentally changed by other parts of your program. For more information, please refer to volatile keyword in java.
如果你喜欢极客博客并想投稿,你也可以写一篇文章并把你的文章邮寄到 contribute@geeksforgeeks.org。看到你的文章出现在极客博客主页上,帮助其他极客。
如果您发现任何不正确的地方,或者您想分享更多关于上面讨论的主题的信息,请写评论
版权属于:月萌API www.moonapi.com,转载请注明出处