Hard
Given this code
public class Singleton {
public static Singleton getInstance() {
return SingletonHolder.instance;
}
private static class SingletonHolder {
private static final Singleton instance = new Singleton();
}
}
What assertions are true?
Author: Clément DevosStatus: PublishedQuestion passed 226 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about Java
2
This code allows to randomly get numbers between 1 to 31 in results. Should have declard SimpleDateFormat in the Thread.1
A code kata is a small exercice thought to train a certain development competence0
Which of these exercies are kata that are regularly encountered?0
Which Java 7 feature was only usable in Java 8?0
Explain why the second code compiles but the first one doesn't.