摘要: 1 public class Param_test { 2 3 public void change(Point point) { 4 5 point.x = 3; 6 point.y = 4; 7 8 } 9 10 public static void main(String[] args) {11 Param_test pt = new Param_test();12 Point point = new Point();13 pt.change(point);14 ... 阅读全文
posted @ 2013-11-02 11:15 烫烫烫烫 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 1 public class Str_test { 2 3 public static void main(String[] args) { 4 5 // String pool 6 // ==比较是否是同一个引用;对于String对象的相等性用equals(),因为该方法已经被override!(Object的equals()比较就是用==判断引用是否相等) 7 // Array没有重写Object的equals(),Arrays重写过 8 String a = "he"; 9 String b =... 阅读全文
posted @ 2013-11-01 23:28 烫烫烫烫 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 1 public class Static { 2 3 public static void main(String[] args) { 4 A a = new A(); 5 a.a();// a 6 7 A a1 = new B(); 8 a1.a();// a 9 B a2 = new B();10 a2.a();// b11 }12 13 }14 15 class A {16 17 public static void a() {18 System... 阅读全文
posted @ 2013-11-01 21:39 烫烫烫烫 阅读(669) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2013-11-01 21:08 烫烫烫烫 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1 2 package Swing_exercise; 3 4 import java.awt.*; 5 6 import javax.swing.*; 7 8 public class Calc extends JFrame { 9 10 JPanel mainPanle, show, rightPanel;11 12 JTextField showIn;13 14 JButton[] jbs = new JButton[9];15 JButton zero = new JButton("0");16 JButton add1 = new JButton("+& 阅读全文
posted @ 2013-10-12 15:20 烫烫烫烫 阅读(453) 评论(0) 推荐(0) 编辑