Thingking in java