Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.18 seconds.

  1. Replies
    4
    Views
    1,341

    Re: Flyweight Design Pattern

    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){

    ...
  2. Replies
    4
    Views
    1,341

    Re: Flyweight Design Pattern

    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...
Results 1 to 2 of 2