![]() Related Questions Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance Latest Answer : Java is only pass-by-value language. Passing a reference is not possible though you can pass by value. If you want changes to reflect back then consider the primitive type in a custom class not a wrapper class i.e., to say, this class will have getter ... Latest Answer : yes a method can be static and synchronized ... Latest Answer : In Java Object are passed by reference and Primitive data is always pass by value ... If there are 2 different versions of object streams on disk and only one object definition, how will If there are 2 different versions of object streams on disk and only one object definition, how will the JVM reject the wrong one? Can you fool the JVM When you have an object passed to a method and when the object is reassigned to a different one, then is the original reference lost Does JVM maintain a cache by itself? Does the JVM allocate objects in heap? Is this the OS heap or the heap maintained by the JVM? Why Can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program? give me answer Latest Answer : public class CSingleton { private static CSingleton inst= null;private static int count=0;protected CSingleton() { ... Read Answers (5) | Asked by : chandu give me answer Latest Answer : We can use clone() method to create another instance of a singleton class.Example:SingletonObjectClass obj = SingletonObjectClass.createSingletonObject();SingletonObjectClass clone = (SingletonObjectClass) obj.clone();java.lang.Object class has a clone ... Read Answers (1) | Asked by : chandu
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||