Comment Comment by ashishb Class Rect { final int x, y; //Constructor goes here }Rect r1 = new Rect(1,2);Is this not sufficient to create an immutable rectangle that I can pass around safely in a multi-threaded code? parent ashishb 1 year ago
Rect r1 = new Rect(1,2);
Is this not sufficient to create an immutable rectangle that I can pass around safely in a multi-threaded code?