Skip to content
Advertisement

Tag: public

Can a object be private and public?

Can a reference to an object be private in class while other object can have a public reference to the same class(post script: new to java+ a simple example please). I read somewhere that this prob is regarding aliasing? Sorry my title may not make sense! Answer Objects aren’t private or public. Fields can be private or public. Fields can

Advertisement