Interview Question
Country: United States
What would you make private? If it's the class, then the class would not be visible. If the constructor, then you wouldn't be able to build an instance of the object through the constructor. If all the methods and properties, then you could still have a subclass that adds new methods or properties. Either way, sealed does something different: it allows you to see and instantiate a class without the ability to create any subclasses of it.
In C# at least, when a class is sealed, it can not be inherited from. When the class is not sealed, you can still inherit from it, at least it's public members/interfaces.
- KidCleveland July 15, 2014