Page 399 - CITS - Computer Software Application -TT
P. 399
COMPUTER SOFTWARE APPLICATION - CITS
}
}
class Main {
public static void main(String[] args) {
Pig myPig = new Pig(); // Create a Pig object
myPig.animalSound();
myPig.sleep();
}
Features of Abstract Class
Java-Abstract_Class_in_Java
The abstract class in Java enables the best way to execute the process of data abstraction by providing the
developers with the option of hiding the code implementation. It also presents the end-user with a template that
explains the methods involved.
Loose Coupling
Data abstraction in Java enables loose coupling, by reducing the dependencies at an exponential level.
386
CITS : IT&ITES - Computer Software Application - Lesson 109 - 115