+1 vote
in JAVA by

Protects the code from others.

Code maintainability.

Example:

We are declaring ‘a' as an integer variable and it should not be negative.

view sourceprint?

1

public class Addition(){

2

int a=5;

3

}

...