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.

CLASSES & OBJECTS

00114.jpg00115.jpgo Object :

 

00116.jpg00117.jpg00118.jpg00119.jpgo An object is an identifiable entity with some characteristic and behaviour.

 

00120.jpg00121.jpgo Class :

 

00122.jpg00123.jpg00124.jpg00125.jpgo A Class is a group of objects that share common properties and
relationships.

 

00126.jpg00127.jpgo The Objects are variables of type Class eg.

 

00128.jpg00129.jpg00130.jpg00131.jpgo If animal has been defined as a Class, then the statement;

 

00132.jpg00133.jpgo animal dog;

 

00134.jpg00135.jpg00136.jpg00137.jpgo will create an Object featuring dog belonging to the class animal.

 

00138.jpg00139.jpg00140.jpg00141.jpg00142.jpg00143.jpg00144.jpg00145.jpgattention@computerscienceexpertise.com

 

00146.jpg00147.jpg00148.jpg00149.jpg00150.jpg00151.jpg00152.jpg00153.jpg00154.jpg00155.jpg00156.jpg00157.jpg00158.jpg00159.jpg00160.jpg00161.jpg00162.jpg00163.jpg00164.jpg00165.jpg00166.jpg00167.jpg00168.jpg00169.jpg00170.jpg