Encapsulation. Encapsulation is a concept that protects data. (data hiding), then we use (encapsulation) to protect the data in (method and variable). GETTERS AND SETTERS. (Data in Out) 1.Get 2.Set Ex : Class Human { private int id; private String name; private int age; } Class Runprogramme { public static void main(String[]...
Posts
Showing posts from November, 2022