• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

简述modifier(public,protected,private我就不说了,大家都比较熟了)

发布: 2007-7-01 18:47 | 作者: admin | 来源: | 查看: 21次 | 进入软件测试论坛讨论

领测软件测试网 static
    *    The modifier static can be applied to an inner class, a method and a variable.    
    *    You cannot access non static variables from within a static method.    
    *    A static method cannot be overriden to be non static in a child class.
    *    A non static (normal) method cannot be overriden to be static in a child class.
        
native
    *    The native modifier is used only for methods and indicates
        that the body of the code is written in a language other than Java such as C and C++.
    *    Native methods are often written for platform specific purposes
        such as accessing some item of hardware that the Java Virtual Machine is not aware of.
        Another reason is where greater performance is required.
    *    the native modifier means that the method can have no body.
        
abstract
    *    The abstract modifier can be applied to classes and methods.
    *    If a class has any abstract methods it must be declared abstract itself.

final
    *    The final modifier can be applied to classes, methods and variables.
    *    A final class may never be subclassed.
    *    Any methods in a final class are automatically final.
    *    The final modifier indicates that a method cannot be overriden.
    *    A final variable cannot have it@#s value changed and must be set at creation time.
    
synchronized
    *    The synchronized keyword is used to prevent more than one thread
        from accessing a block of code at a time.
        
transient
    *    The transient keyword indicates that a variable should not be written out
        when a class is serialized.
        
volatile
    *    The volatile keyword tells the compiler a variable may change asynchronously due to threads.
    

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网