how encapsulation was done in java code example
Example: encapsulation in java
1-ENCAPSULATION: We can hide direct access to data by using
private key and we can access private data by using getter and
setter method.
1-ENCAPSULATION: We can hide direct access to data by using
private key and we can access private data by using getter and
setter method.