File:Oop-uml-class-example.svg · Wikimedia Commons · See Wikimedia Commons
class
Sign in to saveAlso known as cls
in object-oriented programming, a definition that specifies how an object works
In object-oriented programming, a class is a template or blueprint that defines what properties and abilities an object will have. Classes matter because they let programmers organize code efficiently by creating multiple similar objects that all follow the same design, rather than having to write out each object's details from scratch.
AI-generated from the Wikipedia summary — may contain errors.
In the Vinony graph
Within Vinony's link graph, class is referenced by 743 other articles, and connects out to method, inheritance and subset.
Vinony files it under Class (computer programming), Programming constructs and Programming language topics.
Its subject is documented across 53 Wikipedia language editions.
Wikidata facts
- Subclass of
- abstract entity
- Based on
- structure in C
- Has use
- instance
Show 4 more facts
- topic's main category
- Category:Class (computer programming)
- Stack Exchange tag
- stackoverflow.com/tags/class
- partially coincident with
- structure in C
- facet of
- class-based programming
Sources (1)
via Wikidata · CC0
~35 min read
Encyclopedic overview
In programming, a class is a syntactic entity structure used to create objects. The capabilities of a class differ between programming languages, but generally the shared aspects consist of state (variables) and behavior (methods) that are each either associated with a particular object or with all objects of that class.
Object state can differ between each instance of the class whereas the class state is shared by all of them. The object methods include access to the object state (via an implicit or explicit parameter that references the object) whereas class methods do not.
Excerpted from Wikipedia’s “class” article, available under the CC BY-SA 4.0 licence.