AutomationTesting_Java_12
AutomationTesting_Java_12
Abstract classes
Interfaces
1. Abstract Class
An abstract class is a class that cannot be instantiated directly. It can have
abstract methods (methods without a body) as well as concrete methods (methods with
a body). An abstract class is meant to be extended by other classes to provide
implementations for the abstract methods.
java
Copy
interface Animal {
void sound();
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
class Employee {
// Private data members
private String name;
private int age;
private double salary;