Abstract classes are defined as classes using the modifier "abstract". When we want a class to be base class and we don't want to instantiate we use abstract classes. Many a times abstract classes are either partially implemented or not at all implemented.
An abstract class can contain either abstract methods or non abstract methods. Abstract members do not have any implementation in the abstract class, but the same has to be provided in its derived class.
An abstract class cannot be sealed class. We can have abstract methods only in abstract classes. We should use same access modifier for an abstract method in both base class and derived class to avoid compilation errors.
An abstract method cannot have virtual as it is implicitly virtual.
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
Web Application:Any application which we can run in our web browser is a web application. Web Service:A web service is an Application Prog...
-
Amazon cloudfront offers a simple cost effective way to improve the performance, reliability and global reach of your entire website for s...
-
p5.js is a JavaScript library which can be used by artists,designers,educators and beginners who want to code. Using p5.js we have a full se...
No comments:
Post a Comment