Posts

Showing posts from March, 2018

CLASS

Image
Edit Watch this page Read in another language Class (computer programming) Page issues In  object-oriented programming , a  class  is an extensible program-code-template for creating  objects , providing initial values for state ( member variables ) and implementations of behavior (member functions or  methods ). [1] [2]  In many languages, the class name is used as the name for the class (the template itself), the name for the default  constructor  of the class (a  subroutine  that creates objects), and as the type  of objects generated by  instantiating  the class; these distinct concepts are easily conflated. [2] When an object is created by a constructor of the class, the resulting object is called an instance  of the class, and the member variables specific to the object are called instance variables , to contrast with the  class variables  shared across the class. In some languages, classes are only a compile-time feature (new classes cannot be declared at ru