+ 1
What is abstract class
6 ответов
+ 3
Abstract class in java is similar to interface except that it can contain default method implementation. An abstract class can have abstract method without body and it can have methods with implementation also.
abstract keyword is used to create a abstract class and method. Abstract class in java can’t be instantiated. Abstract class is mostly used to provide base for subclasses to extend and implement the abstract methods and override or use the implemented methods in abstract class.
+ 3
Keerttik Titan check this here is clear answer.
https://www.geeksforgeeks.org/abstraction-in-java-2/amp/
+ 2
An abstract class is a class that is declared abstract —it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class.
You can't make an object of an abstract class and if a class is extended from an abstract class, you need to implement all of the methods which where declared in the abstract class
+ 2
Maninder Singh how is abstraction achieved using abstract class?? can you show an example
+ 1
An abstract(empty) class may have abstract(with no body) or non-abstract methods. Abstraction in class makes it work like an interface.The sub-class must implement all abstract methods or else it must be declaired as an abstract class also.
0
any example for abstract class