共1页 1
-
2005年01月28日
Hibernate - XDoclet Tutorial
http://www.downside.ch/hibernate/
The tutorial covers the generation of Hibernate mapping files with XDoclet. If you are new to the Hibernate/XDoclet combo and want to have a glimpse into the world of ORM tools or you are just interested in some mapping examples then this is for you. -
2005年01月28日
blogbus改版了
太久没来了,都不知道已经改版了,好像变得更简洁实用了。不过还不够稳定,时不时的就上不了;而且清新模版的图片有错,http://www.blogbus.com/blogbus/blog/images/templates/cube.gif
应该为http://www.blogbus.com/blogbus/blog/images/cube.gif -
2005年01月10日
纠错
看到一篇文章:[JAVA]初学者的经验---为什么变量无法使用
昨天试了一天
public class temp
{
public String s=“hello“;
public static void main(String[] args)
System.out.println(s);
}
为什么总是执行不了,查了大量的资料(....)发现原来JAVA在加载时,先加载static的内容之后再加载其它,所以在打印时变量仍未声明,因而会出错。
呵呵,初学者会常犯的错误。
其实这种说法完全是错的,原文那里发不了评论,在这里说明一下,免得误导初学者。
不是这个原因,原因是s是实例变量,没有对象的话,是不能引用实例变量的。
你在main里面这样就可以了:
temp t = new temp();
System.out.println(t.s);







