« first day (816 days earlier)      last day (77 days later) » 

2:49 PM
0
Q: Is this a correct use of double checked singleton?

AresI am basically looking for a caching mechanism for the users of HelperWrapper. Is this a correct use of double checked singleton? final class HelperWrapper {   private static volatile Helper helper = null;     public static Helper getHelper() {     if (helper == null) {       synchronized (Helpe...

 
 
3 hours later…
5:57 PM
0
Q: Can I set a final variable in Java with a result of a divison?

raptus93I want to have a global-scale variable, so some graphical objects can always have the same size in relation to the window. My idea: public static final double GLOBALSCALE = SCREENWIDTH / 1920; But my variable is zero at that point. It happens in the datafield of a Singleton-Patterned-Class.. d...

 

« first day (816 days earlier)      last day (77 days later) »