What is the difference between public private, protected and static

Showing Answers 1 - 2 of 2 Answers

Arpit Sakhi

  • Sep 14th, 2005
 

Public

  Was this answer useful?  Yes

arpit

  • Sep 14th, 2005
 

Public : this is lowest restircted modifier, publicly declared object can be usable at any place in ur application even in different package

Protected : that can be used anywhere in the application but in same package

Private : that is highly restricted modifier , this object r not usable outside of that class

static : this r only class variables or methods not the instance methods

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions