Java Learning Made Easy by Dheeraj Mehrotra - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

MODIFIERS

02156.jpg02157.jpg02158.jpg

The visibility labels are of two major types viz. public and private.

02159.jpg02160.jpg

The method or a variable with modifier public is accessible wherever

02161.jpg

the program has access to an object. Any instance variable or

02162.jpg

method declared with class private is accessible only to methods of

02163.jpg

the class.The instance variable private are accessible to methods of

02164.jpg

the class. The instance variables are normally declared private and the methods are declared as public.

02165.jpg02166.jpg02167.jpg02168.jpg02169.jpg02170.jpg02171.jpg02172.jpg02173.jpg02174.jpg02175.jpg02176.jpg02177.jpg02178.jpg02179.jpg02180.jpg02181.jpg02182.jpg02183.jpg02184.jpg02185.jpgattention@computerscienceexpertise.com
02186.jpg02187.jpg02188.jpg02189.jpg
02190.jpg02191.jpg02192.jpg02193.jpg02194.jpg02195.jpg02196.jpg02197.jpg02198.jpg02199.jpg02200.jpg02201.jpg02202.jpg02203.jpg02204.jpg02205.jpg02206.jpg02207.jpg02208.jpg02209.jpg02210.jpg