Chapter 6 Classes & Objects in Java ⦁ Class is a description of an object's property and behavior . ⦁ Creating class is as good as creating data type. ⦁ Class is defining a category of data. Object ⦁ It is a real world entity. ⦁ It is an instance of a class. ⦁ It consumes memory to hold property. Steps for creating an object ⦁ Step 1 : DemoClass newObject ; Here newObject is an variable of DemoClass. ⦁ Step 2 : newObject = new DemoClass ; Here the variable is initialized with an object of DemoClass.
Posts
Showing posts from May, 2020