You are on page 1of 7

PUBLIC AND

PRIVATE
ACCESS
BENTULAN, MARY IRENE
OSORNO, KEITHRYL JOY
ACCESS SPECIFIERS
 An access specifier is the adjective that defines the type of
access (public or private) outside classes will have to the
attribute or method

 The use of access specifiers is important in object-oriented


programming to ensure proper encapsulation and
information hiding, which can improve code maintainability
and security.
PUBLIC ACCESS
 specifies that other programs and methods may use
the specified data or methods within a class.
CHARACTERISTICS:
 Visibility  Code
 Accessibility Reusability
 Encapsulation
 Inheritance
Meet us
ADVANTAGES
 Reusability
 Accessible APIs
 Interoperability DISADVANTAGES
 Security Risks
 Limited Control
 Complexity
PRIVATE ACCESS
 specifies that data or methods cannot be used by any
method that is not part of the same class

CHARACTERISTICS:
 Visibility
 Accessibility
 Inheritance
 Encapsulation
ADVANTAGES
 Security
 Encapsulation
 Maintainability

DISADVANTAGES

 Code Reusability
 Testing
END

You might also like