Top "Abstract" questions

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

What is the difference between an abstract function and a virtual function?

What is the difference between an abstract function and a virtual function? In which cases is it recommended to use …

oop language-agnostic abstract virtual-functions
Can we instantiate an abstract class?

During one of my interview, I was asked "If we can instantiate an abstract class?" My reply was "No. we …

java oop class object abstract
Abstract methods in Python

I am having trouble in using inheritance with Python. While the concept seems too easy for me in Java yet …

python inheritance abstract
Is it possible to make abstract classes in Python?

How can I make a class or method abstract in Python? I tried redefining __new__() like so: class F: def __…

python class inheritance abstract-class abstract
Abstract methods in Java

I want to write an abstract method but the compiler persistently gives this error: abstract methods cannot have a body …

java methods abstract
Can we instantiate an abstract class directly?

I have read we can only instantiate an abstract class by inheriting it, but we cannot instantiate it directly. However, …

java android class oop abstract
Defining an abstract class without any abstract methods

Can I define an abstract class without adding an abstract method?

java class inheritance methods abstract
Abstract variables in Java?

I am coming from c# where this was easy, and possible. I have this code: public abstract class clsAbstractTable { public …

java class variables abstract
Java - Abstract class to contain variables?

Is it good practice to let abstract classes define instance variables? public abstract class ExternalScript extends Script { String source; public …

java class variables abstract
Java abstract interface

Consider an example (which compiles in java) public abstract interface Interface { public void interfacing(); public abstract boolean interfacing(boolean really); } …

java interface abstract