In java, how would you prevent a client from directly instantiating your concrete classes?
For example, you have a Cache interface and two implementation classes MemoryCache and DiskCache, How do you ensure there is no object of this two classes is created by client using new() keyword.