You're comparing apples and oranges. You're using the new keyword with the images, but not with the Strings. Try this:
public class Main{
public static void main(String... args){
...
Type: Posts; User: KevinWorkman
You're comparing apples and oranges. You're using the new keyword with the images, but not with the Strings. Try this:
public class Main{
public static void main(String... args){
...
Why do you think you need to do this?
The flyweight design has nothing to do with equality. Your test would also fail with Strings.
You could create a thousand instances of a large image and...