Question: 2 . This block of code is an example of which OOP concept? abstract class Shape { String color; abstract double area ( ) ;

2. This block of code is an example of which OOP concept? abstract class Shape { String color; abstract double area(); public abstract String toString(); public Shape(String color){ System.out.println("Shape constructor called"); this.color = color; } public String getColor(){ return color; }}
Inheritance
Abstraction
Polymorhpism
Encapsulation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!