We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi, I have a quick question. This question maybe is dumb but I gotta ask.
My first try was create the instance inside the function and return. It doesn't work. Therefore, what is difference between create it as private member and inside of function ?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Singleton Pattern
You are viewing a single comment's thread. Return to all comments →
Hi, I have a quick question. This question maybe is dumb but I gotta ask. My first try was create the instance inside the function and return. It doesn't work. Therefore, what is difference between create it as private member and inside of function ?