"Hi When faced with this question, I really gave up trying to work out what was going on and have given up in despair!
Can you explain whats going on?
Line 3 The 'singleton' identifier was very distracting, whats it doing? and the use of SafeDeposit just about everywhere has further confused me can anyone walk me through this code segment please"
class SafeDeposit { private static SafeDeposit singleton; public static SafeDeposit getInstance(int code) { if(singleton == null) singleton = new SafeDeposit(code); return singleton; } private int code; private SafeDeposit(int c){code = c;} int getCode() {return code;} } public class BeSafe { //insert lots of code here }