http://kmlinux/~culik/wiki private void send (String s) { jTextArea1.append (s + "\n"); } private void send (String id, int [] p) { if (p == null) { send (id + " je null"); } else { /* send (id + " ma " + p.length + " prvku"); for (int i = 0; i < p.length ; i ++) send (id + "[" + i + "] = " + p[i]); */ String txt = id + " = ("; for (int i = 0; i < p.length ; i ++) { if (i > 0) txt += ", "; txt += p[i]; } txt += ")"; send (txt); } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { int [] a = new int [3]; for (int i = 0; i < a.length; i++) a[i] = i * i; int [] t = new int [a.length + 1]; for (int i = 0; i < a.length; i++) t [i] = a [i]; send ("Pole a", a); send ("Pole t", t); a = t; send ("Pole a", a); send ("Pole t", t); int [] z = new int [0]; send ("Pole z", z); int [] e = null; send ("Pole e", e); }