ए भाई Think ज़रा हटके
Note: amtyThumb must be installed for new version of amty thumb post/recent

Java Burning Interview question – Access Modifiers

I love to summarize theoretical concepts in my way. I have made an image to understand access modifiers in java. I hope it can be tagged to your personal notice board.

Java Access Modifiers

Some theory:

  1. public are accessible everywhere whether same class, sub class, other package etc
  2. protected are accessible everywhere in same package. But it becomes private in subclass of another package.
  3. default are accessible to the same package whether sub class or independent class.
  4. private are accessible to the class itself or its nested class only.
Amit Gupta

Hey! this is Amit Gupta (amty). By profession, I am a Software Eng. And teaching is my passion. Sometimes I am a teacher, as you can see many technical tutorials on my site, sometimes I am a poet, And sometime just a friend of friends...

189
views


To book below area mail me




captcha

You can follow any responses to this entry through the RSS 2.0 feed.