Qus:    Can sealed class can be inherited?
Dec 11, 2020 15:21 2 Answers Views: 711 FRAUSKY

 Public class sealed ParentClass {

Public void Method1()

{

}

}

Public class MyChildClass:

ParentClass -> It will throw the error due to sealed class ,

it will allow to inherited in the child class

{

Public Void Method2()

{

}

}

Prev Next
Answers (2)
PARTH Dec 12, 2020 02:58
Answer:   No, a sealed class cannot be inherited.

SHIVA Dec 12, 2020 08:26
Answer:   Public class sealed ParentClass {
Public void Method1()
{
}
}
Public class MyChildClass:
ParentClass -> It will throw the error due to sealed class ,
it will allow to inherited in the child class
{
Public Void Method2()
{
}
}

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect