Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Classes and objects in java

198 views

Published on

introduction to classes and objects in java

Published in: Education
  • Be the first to comment

  • Be the first to like this

Classes and objects in java

  1. 1. Class A class is the blueprint from which individual objects are created. A class is a user defined datatype modifier class classname { data item1; .. .. data item n; member functions(); }
  2. 2. Class and object example
  3. 3. Constructors in java Constructors are the functions that are executed on the instance of creating an object for that class. Constructors can be overloaded. Constructor must not have a return type. Variables can only be assigned in constructors but inside the class.
  4. 4. Example for Constructors

×