摘要: 观察下面的代码:class Person{ String name ; int age ; public void tell(){ System.out.println("姓名:" + name +",年龄:" + age) ; }}public class SimpleDemo{ public static void main(String args[]){ Person per = new Person() ; per.name = "张三" ; per.age = -30 ; per.tell() ; }} 如果现在的年龄为负数 阅读全文
posted @ 2011-12-28 11:43 M-Stone 阅读(314) 评论(0) 推荐(0) 编辑