Close
Close

What is use of private keyword?

   ALIF MONDAL


Answers

  •   

    private keyword declares the methods and data members of a class as private. Declaring the methods and data members as private means that these can only be accessed by the members of the same class. These cannot be accessed from another class.

    You can read about it from https://www.codesdope.com/java-subclass/.



Ask Yours
Post Yours
Write your answer