[xkcd] Bonding (20 Mar 2013)
[xkcd] Bonding (20 Mar 2013)
![](https://programming.dev/pictrs/image/927e978f-2a85-4269-a14f-e10666fd027a.png?thumbnail=1024&format=webp)
Hover Text:
I'm trying to build character, but Eclipse is really confusing.
Transcript (from explainxkcd)
class Ball extends Throwable {}
class P{
P target;
P(P target) {
this.target = target;
}
void aim (Ball ball) {
try {
throw ball;
}
catch (Ball b) {
target.aim(b);
}
}
public static void main(String[] args) {
P parent = new P(null);
P child = new P(parent);
parent.target = child;
parent.aim(new Ball());
}
}
1
comments
This took me a minute. Groan...
1 0 Reply