I know that assigning the access type 'private' to a variable is to prevent other methods from accessing and modifing that variable from out side its class.
I understand that the get and set modifiers are typically used to access private variables.
Why can a private variable be accessed by a get and set modifier if its supposed to be private? Isnt a private variable supposed to be protected from modification from outside its class?