Wednesday, December 22, 2010

Java-Reference variable: this


class TestThisFunc {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}

class SomeClass {
private int x = 0;
private int y = 0;
private int z = 0;

SomeClass(int x) {
this(x, 0, 0);
}
SomeClass(int x, int y) {
this(x, y, 0);
}
SomeClass(int x, int y, int z) {
if (x != 0) {
}
if (y != 0) {
}
if (z != 0) {
}
}
}

0 comments:

Post a Comment

Contact Form

Name

Email *

Message *