天空是蓝色的

做好软件为中国 #gcc -c helloworld.c -o helloworld.o //编译目标文件 #gcc helloworld.o -o helloworld //编译成可执行exe #helloworld //运行exe
数据加载中……
the blank final field userName may not have been initialized
public class TestBean {
    
public final String userName;
    
public TestBean(String arg1){
        
//构造函数
        
    }


}

注意final字段的初始化,三种初始化字段的方式

http://www.blogjava.net/bluesky/articles/18872.html

posted on 2005-12-05 17:23 bluesky 阅读(9921) 评论(3)  编辑  收藏 所属分类: 工作总结

评论

# re: the blank final field userName may not have been initialized 2011-06-06 16:08 assignment writers

非常丰富的网站。继续保持如此良好的工作。
  回复  更多评论    

# re: the blank final field userName may not have been initialized 2012-12-13 02:07 zhong

final是把USERNAME定义为常量的,所以要给它一个值。改成public final string username = "xxxxx";@assignment writers
  回复  更多评论    

# PM Assignment Help 2016-03-04 13:07 Addison Randall

Our website is No. 1 in Project Management Assignment Help. You can also hire us for PM Homework and Assignment Help.
  回复  更多评论    

只有注册用户登录后才能发表评论。


网站导航: