`

java keywords 关键字

阅读更多
Java Language Specification 中的关键字列表:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.9
引用
3.9 Keywords
50 character sequences, formed from ASCII letters, are reserved for use as keywords and cannot be used as identifiers (§3.8).:
Keyword: one of
    abstract   continue   for          new         switch
    assert     default    if           package     synchronized
    boolean    do         goto         private     this
    break      double     implements   protected   throw
    byte       else       import       public      throws
    case       enum       instanceof   return      transient
    catch      extends    int          short       try
    char       final      interface    static      void
    class      finally    long         strictfp    volatile
    const      float      native       super       while               
       
The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to produce better error messages if these C++ keywords incorrectly appear in programs.

While true and false might appear to be keywords, they are technically Boolean literals (§3.10.3). Similarly, while null might appear to be a keyword, it is technically the null literal (§3.10.7).




transient,volatile:
http://stackoverflow.com/questions/106591/do-you-ever-use-the-volatile-keyword-in-java?rq=1
引用
When is volatile enough?

If two threads are both reading and writing to a shared variable, then using the volatile keyword for that is not enough. You need to use synchronization in that case to guarantee that the reading and writing of the variable is atomic.

But in case one thread reads and writes the value of a volatile variable, and other threads only read the variable, then the reading threads are guaranteed to see the latest value written to the volatile variable. Without making the variable volatile, this would not be guaranteed.

Performance considerations of using volatile:

Reading and writing of volatile variables causes the variable to be read or written to main memory. Reading from and writing to main memory is more expensive than accessing the CPU cache. Accessing volatile variables also prevent instruction reordering which is a normal performance enhancement technique. Thus, you should only use volatile variables when you really need to enforce visibility of variables.
分享到:
评论

相关推荐

    排名关键字工具keywordS 关键字排名

    baidu排名关键字工具keywordS google排名关键字工具keywordS yahoo排名关键字工具keywordS

    使用ES+JavaWeb实现关键词索引相关文章内容

    使用ES+JavaWeb实现关键词索引相关文章内容

    非常实用的关键字查询工具

    非常好用有效的关键字查询工具 如果您觉得这个软件非常好用 请介绍给他人

    基于关键字驱动自动化测试平台的设计与实现

    本文最终实现了一个基于关键字驱动的自动化测试平台APK(Automated test Platform based on Keywords)。 在APK的实现过程中采用基于C/S的网络框架,该网络框架可以实现多用户定制测试任务并完成分布式自动化测试。在...

    Java Web应用开发:商品搜索.docx

    在商品搜索框中输入商品名称(全部或部分名称),在tb_product表中搜索商品名称包含搜索关键字的商品,展示在页面上。下面是能搜索到商品、搜索不到商品、查询关键字为空的结果。 搜索“鞋”的结果 搜索“鞋”的结果...

    RobotFramework之关键字.pdf

    4: :Keywords参考库 参考库 RobotFramework有很多可以参考的库,但是我只是⽤到了BuiltIn和Selenium2Library,⾥⾯提供 了写脚本的⼀些关键字,但是Wait Until Element Is Visible这个关键字⽤不了,原因我也不...

    JAVAJsp的网上书店系统

    【关键字】JAVA, JavaBeans, Servlet, JSP, 网络编程, 电子商务, 网上书店 Abstract At present JAVA is the hottest programming language for WEB development, This text described the characteristics of ...

    关键字提取:关键字提取中算法的实现,包括TextRank,TF-IDF和两者的组合

    Java中的关键字提取服务器化关键字提取算法的实现,包括TextRank,TF-IDF,TextRank和TFTF-IDF。切割词和过滤停用词均依赖 该存储库主要包括三个部分: 1.算法:用于服务器执行关键词提取的算法,包括TextRank,TF-...

    基于JAVA + MySQL的图书管理系统+WORD文档报告.zip

    关键字:Java, MySQL, 图书管理系统, MVC三层架构 Abstract This paper introduces the whole process of library management system development. By using MySQL database as the back-end database, the ...

    Keywords-Alert-Android:检查某些网站的关键字更新

    关键字-警报-Android 检查某些网站的关键字更新

    Java开源的下一代社区平台Symphony.zip

    标签:根据帖子内容智能抽取关键字进行标签自动补全,一篇帖子关联多个标签。标签和标签之间以带边权重的图结构进行描述,方便进行相关计算 领域:一个领域下包含了多个标签,通过标签将帖子自动聚合到具体领域,...

    word源码java-code-words:从源代码中提取单个(自然语言)单词

    java-keywords -s cargo-cult-java-stop-words | wordcloud -o project.png 停用词文件和停用词文件每行必须有一个词。 在从语言中提取标识符之后,但在进一步处理之前,关键字文件中的单词会被过滤掉。 在将标识符...

    POS-Tagging-for-KeyWord-Extraction:关键字提取

    在Java代码中,对于关键字,我主要考虑了名词,形容词和动词。 基本上,这些是实际上在查询中起作用的单词。 例如,如果我们有一个句子,例如“ Mercedes and it's cars”。 这里感兴趣的词主要是“ Mercedes”和...

    RobotFramework教程

    也有java实现版本测试功能是基于关键字(keywords)实现的,这是robot测试功能的中心思想。对于不同方面测试的关键字,例如数据库测试,是和不同的测试包结合在一起的。Robotframework本身自带了标准测试包。(新手...

    java收银系统源码-ieee-keywords:IEEEComputerSociety组织知识的关键词

    java收银系统源码IEEE 关键词 以下是所有 IEEE 计算机协会关键字的列表: (最后更新于 2020 年 1 月) 一般文献 A.0 一般 A.0.a 传记/自传 A.0.b 会议论文集 A.0.c 一般文学作品 A.1 介绍和调查 A.2 参考 杂项 B ...

    AnalysisEngine

    有意义的句子是通过检查哪些句子中包含热门关键字以及信息性分隔符(在 Parser.java 中定义)来确定的。 ###如何运行 用户可以在指定或不指定输出文件的情况下运行程序。 必须指定输入文件。 使用输出文件: ...

    parse_lex_file_to_extract_keywords

    文件描述ExtractKeyword.java将使用自动生成的词法分析器和解析器来解析文件。 并使用ExtractListener将关键字提取为字典。 ExtractListener.java侦听解析树的树步。 监听事件,例如进入节点和退出节点。 用于收集...

    SMARTKeyword:尚未优化(正在处理)

    创建可在android和其他平台上使用的java库。 工作暂停。 大多数功能已经实现,但尚未optimized 。 主要目标是简化android应用中的搜索功能。 它还有助于根据任何内容或文章的词频生成keywords 。 它遵循标准公式,...

    Exchange-encrypted-file-using-keywords

    使用AES-SHA1在加密数据库中进行关键字搜索项目目的提高JAVA编程技能了解密码算法和数据库成员金敬锡

    web-automation:混合测试自动化框架

    使用数据驱动框架和关键字驱动...注意:在src / main / resources / test_accounts.xlsx,src / main / resources / keywords.xlsx和src / main / java / com / webapp / config / config.properties中提供有效的凭证

Global site tag (gtag.js) - Google Analytics