No, for String it works.
Lets run the below code.
String str1= "flyweight";
String str2= "flyweight";
System.out.println(str1==str2); // the output is true
The output indicates that...
Type: Posts; User: novicenovice
No, for String it works.
Lets run the below code.
String str1= "flyweight";
String str2= "flyweight";
System.out.println(str1==str2); // the output is true
The output indicates that...
I read that Java String and Image classes implements 'Flyweight Design' pattern. I know, how to test this for a String class. But, I could not find a way to check this for Image class. My idea is...