How would you stop a class from class from being derived or
inherited.
Answer Posted / anant tiwari
There are three way to stop a class been derived (example in C#)
1) declare a class as static (Ex : static class Sample {....}
2) declare the class constructor as private (Ex class Sample{ private Sample(){}....}
3) declare a class as sealed class Ex : sealed class Sample {...}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the example of polymorphism?
write a program that takes input in digits and display the result in words from 1 to 1000
What is oops?what is its use in software engineering?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is object in oop?
Explain the concepts involved in Object Oriented programming.
Why is abstraction needed?
write knight tour problem which is present in datastructure
What is the point of oop?
Why do we use polymorphism in oops?
How do you achieve polymorphism?
How to use CMutex, CSemaphore in VC++ MFC
What is a class and object?
What is polymorphism and its types?