Hi guys,
Following is a summary about the combination of Java keywords.
Hope it will be useful for all Java guys.
For any question, please contact yexianyi@hotmail.com
Thanks,
Xianyi.Ye
Java Keywords Combination Summary
|
private
|
protected
|
public
|
abstract
|
static
|
final
|
synchronized
|
native
|
General
Class
Declaration
|
Same as the declaration of interface and abstract class
|
√
|
√
|
Only Inner class could be declared as static
|
√
|
Synchronized and native only could be used for method declaration
|
General
Class
Member Variables
|
√
|
√
|
√
|
√
|
√
|
√
|
Synchronized and native only could be used for method declaration
|
General
Class
Member Method
|
√
|
√
|
√
|
√
|
√
|
√
|
√
|
√
|
Interface
Declaration
|
Same as General class declaration, interface only could be declared as public and abstract
|
√
|
√
|
Since the purpose of declaring interface is to make derived class inherit it, so it is not allowed to set interface as final.
|
Interface
Member Variables
|
|
√
(d)
|
|
√
(d)
|
√
(d)
|
Default type of interface variable is public, static and final.
|
Interface
Method
|
|
√
(d)
|
√
(d)
|
Default type of interface method is public and abstract.
|
Abstract Class
Declaration
|
Same as General class declaration, abstract class only could be declared as public and abstract
|
√
|
√
|
Since the purpose of declaring abstract class is to make derived class inherit it, so it is not allowed to set abstract class as final.
|
Abstract Class
Member Variables
|
√
|
√
|
√
|
|
√
|
√
|
Synchronized and native only could be used for method declaration
|
Abstract Class
Method
|
√
|
√
|
√
|
√
|
√
|
√
|
√
|
√
|
Inner Class
Declaration
|
√
|
√
|
√
|
√
|
√
|
√
|
Synchronized and native only could be used for method declaration
|
Inner Class
Member Variables
|
√
|
√
|
√
|
|
√
(If class is static )
|
√
|
Synchronized and native only could be used for method declaration
|
Inner Class
Method
|
√
|
√
|
√
|
√
|
√
(If class is static )
|
√
|
√
|
√
|
Anonymous Inner Class
Member Variables
|
√
|
√
|
√
|
Since the declaration and definition of Anonymous Inner Class is bound together, so we cannot set the keyword static on both declaration and
Member variables
|
√
|
Synchronized and native only could be used for method declaration
|
Anonymous Inner Class
Method
|
√
|
√
|
√
|
Since the declaration and definition of Anonymous Inner Class is bound together, so we cannot declare method as abstract as well as static.
|
√
|
√
|
√
|
分享到:
相关推荐
Standard Edition 7 (Java SE 7), Java: A Beginner's Guide, Fifth Edition starts with the basics, such as how to compile and run a Java program, and then discusses the keywords, syntax, and constructs ...
Best-selling programming author Herb Schildt covers the entire Java language, including its syntax, keywords, and fundamental programming principles. You’ll also find information on key portions of ...
Bestselling programming author Herb Schildt covers the entire Java language, including its syntax, keywords, and fundamental programming principles. You'll also find information on key portions of ...
Today, there are so many resources to learn ...Chapter 10: Keywords Chapter 11: Threads Chapter 12: Writing and Reading files Chapter 13: Serialization Chapter 14: Operators Chapter 15: Lambda expression
表单项名称“keywords”,提交后的请求参数为keywords=用户填写的内容表单提交地址,携带请求参数action 表单项名称“keywords”,提交后的请求参数为keywords=用户填写的内容 表单提交地址,携带请求参数action ...
语言:English,polski semstrom:关键字是一个免费的关键字工具,允许从谷歌获取更多关键词建议。 semstrorm:关键字是Google Chrome浏览器的一个免费插件,有助于您找到更多直接来自谷歌的关键字建议。...
Java How to Program (Late Objects), Tenth Edition is intended for use in the Java programming course. It also serves as a useful reference and self-study tutorial to Java programming. The Deitels’ ...
keywordskeywords,搜索关键词,包括各种教程、安全、awesome、c、Linux、运维、数据库、安卓android、ios、小程序、golang、Java、JavaScript、python、php、rust、机器学习machine learning、游戏game、各种开源...
java web OSGi (Open Services Gateway Initiative) provides a programming model for service components. Programming based on OSGi can bring many ...Keywords: OSGi; Integration Framework; Java Web;
标签、领域可以自定义链接,并且可以单独配置 meta title/keywords/description 后端 Markdown 渲染,输出爬虫可读的 HTML 管理员设置的浏览权限不影响爬虫抓取内容 通过一些 HTML 细节属性(比如 canonical)...
It then discusses the keywords, features, and constructs that form the core of the Java language. You’ll also find coverage of some of Java’s most advanced features, including multithreaded ...
Part 3: Implementing Keywords in Java Part 4: Selenium2Library as a drop-in replacement for SeleniumLibrary Part 5: Integration with TeamCity CI-Server Part 6: Integration with Jenkins Part 7: File ...
Keywords: JAVA, JavaBeans, Servlet, JSP, web program, internet, bookshop 目 录 1、JAVA的网络功能与编程 1-1 JAVA语言简介 1-2 JAVA语言在网络上的应用 1-3 JSP的基础——Servlet 技术 1-4 JavaBeans...
Java Keywords Volume I: Streams and Files Networking Database programming XML JNDI and LDAP Internationalization Advanced GUI components Java 2D and advanced AWT JavaBeans Security RMI ...
Chapter 1 GETTING STARTED 1 Chapter 2 CONSOLE INPUT AND OUTPUT 57 Chapter 3 FLOW OF CONTROL 99 Chapter 4 DEFINING CLASSES I 173 Chapter 5 DEFINING ...Appendix 5 SUMMARY OF CLASSES AND INTERFACES 1147
Identifier_Keywords_Types [课程目录参见http://blog.csdn.net/hhmoll/archive/2009/05/17/4194305.aspx]
麻雀企业网站管理系统 v3.0 主要功能: 1、新闻信息:可分多类(内部新闻,... 6、新闻信息和产品展示动态添加meta标签:keywords,description ,同时url重写htm页面更好的被搜索引擎收入。 后台用户名密码admin
U can check whether the keywords are in a file system by running this shell script