Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Code explanation#

Sumit Rawal answered on May 17, 2023 Popularity 5/10 Helpfulness 1/10

Contents


More Related Answers

  • html code
  • html code example
  • html code example
  • html code example
  • html code example
  • what is coding
  • html code
  • code example
  • code in html
  • hwo to code
  • hwo to code
  • example of coding
  • html code
  • Good code:
  • how to create a object using JavaScript
  • all codes of html

  • Code explanation#

    0

    In the code above, ID is a public property, but __salary is a private property, so it cannot be accessed outside the class.

    When it is tried to be accessed outside the class, the following error is generated:

    'Employee' object has no attribute '__salary'

    To ensure that no one from the outside knows about this private property, the error does not reveal its identity.

    Popularity 5/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on May 17 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.