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 337 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
1
Write a Java implementation of the FizzBuzz code kata.1
A Java class that converts Arabic numbers to Roman numerals.1
What does SRP stand for?1
Java code that replaces keys in a template with their values.2
Write a function that returns the first character of a string in Java1
What is the name of the design pattern used to structure complex applications by considering the problem domain?4
This code allows to randomly get numbers between 1 to 31 in results. Should have declard SimpleDateFormat in the Thread.