Interviews6 answers
What is Sealed modifiers?
6 Answers
Sealed is keyword
if we want stop inheritance then we use Seale before class
& for stopping ovrriding we use Sealed before method
Mukesh KumarPosted Aug 28, 2017, 10:33 PM EDT
the sealed keyword is used to prevent inheritance
Ravi PatelPosted Oct 18, 2016, 1:39 AM EDT
Nice explanation Dheeraj Kumar Jha.
Prakash TripathiPosted Apr 10, 2016, 5:48 AM EDT
The sealed modifier is used to prevent derivation from a class. An error occurs if a sealed class is specified as the base class of another class.
Keerthi VenkatesanPosted Apr 3, 2016, 11:53 PM EDT
We know that sealed keyword teaches me security related information. OK so whenever we talk about sealed , sealed is a keyword in Oops, which is used for some particular behavior that means when we want to a method that is work for only for me i.e. particular class and we want that function can't use by the other class in that case we go for function or class mark as a sealed.
sealed is a keyword which is used to seal a class or function and prevent it to get inherited from any other classes. In other words, a sealed class cannot be inherited. similarly function can't be used by the other class.
Dheeraj Kumar JhaPosted Mar 16, 2016, 4:20 AM EDT
Sealed types cannot be inherited & are concrete.
Sealed modifiers can also be applied to instance methods, properties, events & indexes. It can't be applied to static members.Sealed members are allowed in sealed and non-sealed classes.
Samir BhogaytaPosted Sep 3, 2015, 4:18 AM EDT





