If I want to write java Private and public in Metaphors and Analogies
explain it and the key concept in computer science that it mimics.
Answers (1)
I would use a person and country.
if im a person (spud) in my city (class country1), i can go the the club, grocery store, other states, and talk to other variables, erhm.. i mean people.... in my country. But if I try to go from my country (country1) to another country (country2) the borders may or may not be open for me to travel. that where public and private come in.
public would mean that the country's borders are open for traffic and private would mean that the borders are closed off and not allowing any information to be passed through.