Sealed class are those class which can not be treated as sub class or child class.Sealed class can not be abstract classes .It is used in c...
Sealed class are those class which can not be treated as sub class or child class.Sealed class can not be abstract classes.It is used in c sharp,java etc.
Syntax:-
sealed class xyz
{
.
.
.
.
}
Sealed Method:-Sealed method are the methods which are widely used in c#,java etc.It is used to override virtual function with the same signature.
Example:-
class X
{
public virtual void function()
.
.
.
}
}
class Y:X
{
public sealed override void function()
{
.
.
.
}
}
class Z:Y
{
public sealed override void function()
{
.
.
.
}
}
Syntax:-
sealed class xyz
{
.
.
.
.
}
Sealed Method:-Sealed method are the methods which are widely used in c#,java etc.It is used to override virtual function with the same signature.
Example:-
class X
{
public virtual void function()
.
.
.
}
}
class Y:X
{
public sealed override void function()
{
.
.
.
}
}
class Z:Y
{
public sealed override void function()
{
.
.
.
}
}
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS