Skip to content

Instantly share code, notes, and snippets.

@JRJurman
Last active December 17, 2015 11:29
Show Gist options
  • Select an option

  • Save JRJurman/5602332 to your computer and use it in GitHub Desktop.

Select an option

Save JRJurman/5602332 to your computer and use it in GitHub Desktop.
public class Herp {
Herp cur;
public Herp() {
cur = this;
}
/* Doesn't work... :(
public void test() {
System.out.println(this.this.this);
}
*/
public void test2() {
System.out.println(cur.cur.cur);
}
public void loop() {
while (cur.cur != null) {
System.out.println(cur);
cur = cur.cur;
}
}
public String toString() {
return "this";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment