逛奔的蜗牛

我不聪明,但我会很努力

   ::  :: 新随笔 ::  ::  :: 管理 ::
public class Avatar {
    public static final String NAME;
    public static final String INFO = "avatar";

    static {
        NAME = "Biao"; // 可以从文件读取
    }

    public static void main(String[] args) {
        System.out.println("Name: " + Avatar.NAME + ", info: " + Avatar.INFO);
    }
}
@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted on 2014-08-18 08:48 逛奔的蜗牛 阅读(965) 评论(5)  编辑 收藏 引用 所属分类: Java

评论

# re: Java:static final 变量的初始化 2014-11-18 15:18 friv4
woww! Thanks you. I need it's. Thanks for share  回复  更多评论
  

# re: Java:static final 变量的初始化 2014-12-29 10:04 girlsgogames
Share it useful, thank you. I did it  回复  更多评论
  

# re: Java:static final 变量的初始化 2015-01-24 16:16 friv 4
Thanks for sharing!  回复  更多评论
  

# re: Java:static final 变量的初始化 2016-06-29 11:36 starfall

nice thank you for share this information.  回复  更多评论
  

# re: Java:static final 变量的初始化 2016-07-15 08:08 Unblocked Games
Really unbelievable, is not as easy as you can see, the posts difficulty and challenge waiting for you and that's the main difficulties that make us interesting.
  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理