Top "Abstract" questions

abstract is a keyword shared by a multitude of object-oriented programming languages.

Passing parameters to the base class constructor

If the base class and derived class both have their constructors with parameters then where we pass the parameters to …

c# inheritance parameters abstract
Why can abstract methods only be declared in abstract classes?

I understand that in abstract classes methods be both abstract, or not. But why can I not create an abstract …

java abstract-class abstract abstract-methods
Abstract attribute (not property)?

What's the best practice to define an abstract instance attribute, but not as a property? I would like to write …

python abstract
Why can't you call abstract functions from abstract classes in PHP?

I've set up an abstract parent class, and a concrete class which extends it. Why can the parent class not …

php oop static methods abstract
Different return types of abstract method in java without casting

I am trying to implement and override a method with different return types without being forced to cast the return …

java methods abstract return-type
What is the use of 'abstract override' in C#?

Just out of curiosity I tried overriding a abstract method in base class, and method the implementation abstract. As below: …

c# overriding abstract
How to create a dynamic array of an Abstract class?

Lets say I have an abstract class Cat that has a few concrete subclasses Wildcat, Housecat, etc. I want my …

c++ arrays abstract-class abstract
Scala's sealed abstract vs abstract class

What is the difference between sealed abstract and abstract Scala class?

scala class abstract sealed
No enclosing instance of type PerfHelper is available due to some intermediate constructor invocation

Consider the below code: class abstract Normal1 extends Something { } class Outer { class abstract Inner extends Normal1 { } } class General extends Outer.…

java abstract inner-classes
Is there a way to make sure classes implementing an Interface implement static methods?

First of all, I read erickson's useful reply to "Why can’t I define a static method in a Java …

java interface static abstract