Public Vprivate Vprotected

Public Versus Private Versus Protected #


Public #

The public keyword essentially means that this method or class can be access by anyone who has access to the file, and other files in the project would be able to access these methods

Private #

The private keyword essentially means that this method can only be access within this file itself

Protected #

The protected keyword essentially means that different files can access the methods/functions/code inside the protected object, but it cannot change and values inside of it