What is the difference between private & public & friendly classes?

devquora
devquora

Posted On: Jan 04, 2021

 

Public containers would be Visible to all classes, Friendly variables would be Visible to the only same package, while Private containers would be Visible only to the container to which they belong.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Data Structure Interview Questions

    What is meant by Object Oriented Programming – OOP?

    Object-oriented programming (OOP) is a computer programming technique that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field ...

    Data Structure Interview Questions

    What is meant by Structural Programming?

    Structured Programming can be defined as a programming Approach in which the program is made as a single structure. Lines or blocks of codes are written and executed in a sequential manner such as one...

    Data Structure Interview Questions

    What is meant by Class?

    A class is the most important part of object-oriented programming which is used for the purpose of creating objects. It is defined as the template of similar types of objects consists of a declaration...