51
submitted 2 months ago by mac@programming.dev to c/comics@programming.dev

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());
    }
}

top 1 comments
sorted by: hot top controversial new old
[-] Warl0k3@lemmy.world 1 points 2 months ago

This took me a minute. Groan...

this post was submitted on 24 Mar 2024
51 points (94.7% liked)

Comics

375 readers
1 users here now

A community for sharing comics related to programming

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 4 months ago
MODERATORS