CINXE.COM

Class (computer programming) - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Class (computer programming) - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"da1cfd15-ce2c-4e55-b020-654396f625c2","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Class_(computer_programming)","wgTitle":"Class (computer programming)","wgCurRevisionId":1255112799,"wgRevisionId":1255112799,"wgArticleId":7392,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","All articles with unsourced statements","Articles with unsourced statements from April 2012","Articles with example Java code","Articles needing additional references from April 2012","All articles needing additional references","Articles needing additional references from May 2024","Class (computer programming)","Programming constructs","Programming language topics"], "wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Class_(computer_programming)","wgRelevantArticleId":7392,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":50000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false, "wgWikibaseItemId":"Q4479242","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","ext.scribunto.logs","site","mediawiki.page.ready", "jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Class (computer programming) - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Class_(computer_programming)"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Class_(computer_programming)&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Class_(computer_programming)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Class_computer_programming rootpage-Class_computer_programming skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Class+%28computer+programming%29" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Class+%28computer+programming%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Class+%28computer+programming%29" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Class+%28computer+programming%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Attributes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Attributes"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Attributes</span> </div> </a> <button aria-controls="toc-Attributes-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Attributes subsection</span> </button> <ul id="toc-Attributes-sublist" class="vector-toc-list"> <li id="toc-Object_lifecycle" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Object_lifecycle"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Object lifecycle</span> </div> </a> <ul id="toc-Object_lifecycle-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Type"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>Type</span> </div> </a> <ul id="toc-Type-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Structure" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Structure"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.3</span> <span>Structure</span> </div> </a> <ul id="toc-Structure-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Behavior" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Behavior"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4</span> <span>Behavior</span> </div> </a> <ul id="toc-Behavior-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Class_interface" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Class_interface"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.5</span> <span>Class interface</span> </div> </a> <ul id="toc-Class_interface-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Member_accessibility" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Member_accessibility"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.6</span> <span>Member accessibility</span> </div> </a> <ul id="toc-Member_accessibility-sublist" class="vector-toc-list"> <li id="toc-Inheritance" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Inheritance"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.6.1</span> <span>Inheritance</span> </div> </a> <ul id="toc-Inheritance-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Inter-class_relationships" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Inter-class_relationships"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Inter-class relationships</span> </div> </a> <button aria-controls="toc-Inter-class_relationships-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Inter-class relationships subsection</span> </button> <ul id="toc-Inter-class_relationships-sublist" class="vector-toc-list"> <li id="toc-Compositional" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Compositional"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Compositional</span> </div> </a> <ul id="toc-Compositional-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Hierarchical" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Hierarchical"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Hierarchical</span> </div> </a> <ul id="toc-Hierarchical-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Modeling" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Modeling"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Modeling</span> </div> </a> <ul id="toc-Modeling-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Taxonomy" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Taxonomy"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Taxonomy</span> </div> </a> <button aria-controls="toc-Taxonomy-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Taxonomy subsection</span> </button> <ul id="toc-Taxonomy-sublist" class="vector-toc-list"> <li id="toc-Abstract_and_concrete" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Abstract_and_concrete"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Abstract and concrete</span> </div> </a> <ul id="toc-Abstract_and_concrete-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Local_and_inner" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Local_and_inner"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Local and inner</span> </div> </a> <ul id="toc-Local_and_inner-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Metaclass" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Metaclass"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Metaclass</span> </div> </a> <ul id="toc-Metaclass-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sealed" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Sealed"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Sealed</span> </div> </a> <ul id="toc-Sealed-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Open" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Open"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>Open</span> </div> </a> <ul id="toc-Open-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Mixin" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Mixin"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Mixin</span> </div> </a> <ul id="toc-Mixin-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Partial" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Partial"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.7</span> <span>Partial</span> </div> </a> <ul id="toc-Partial-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Uninstantiable" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Uninstantiable"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.8</span> <span>Uninstantiable</span> </div> </a> <ul id="toc-Uninstantiable-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Unnamed" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Unnamed"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.9</span> <span>Unnamed</span> </div> </a> <ul id="toc-Unnamed-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Benefits" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Benefits"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Benefits</span> </div> </a> <ul id="toc-Benefits-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Runtime_representation" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Runtime_representation"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Runtime representation</span> </div> </a> <ul id="toc-Runtime_representation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Prototype-based_programming" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Prototype-based_programming"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Prototype-based programming</span> </div> </a> <ul id="toc-Prototype-based_programming-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Class (computer programming)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 50 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-50" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">50 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/Klasse" title="Klasse – Afrikaans" lang="af" hreflang="af" data-title="Klasse" data-language-autonym="Afrikaans" data-language-local-name="Afrikaans" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%B5%D9%86%D9%81_(%D8%AD%D9%88%D8%B3%D8%A8%D8%A9)" title="صنف (حوسبة) – Arabic" lang="ar" hreflang="ar" data-title="صنف (حوسبة)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Sinif" title="Sinif – Azerbaijani" lang="az" hreflang="az" data-title="Sinif" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81_(%D0%BF%D1%80%D0%B0%D0%B3%D1%80%D0%B0%D0%BC%D0%B0%D0%B2%D0%B0%D0%BD%D0%BD%D0%B5)" title="Клас (праграмаванне) – Belarusian" lang="be" hreflang="be" data-title="Клас (праграмаванне)" data-language-autonym="Беларуская" data-language-local-name="Belarusian" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://be-tarask.wikipedia.org/wiki/%D0%9A%D0%BB%D1%8F%D1%81%D0%B0_(%D0%BF%D1%80%D0%B0%D0%B3%D1%80%D0%B0%D0%BC%D0%B0%D0%B2%D0%B0%D0%BD%D1%8C%D0%BD%D0%B5)" title="Кляса (праграмаваньне) – Belarusian (Taraškievica orthography)" lang="be-tarask" hreflang="be-tarask" data-title="Кляса (праграмаваньне)" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="Belarusian (Taraškievica orthography)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B8%D1%80%D0%B0%D0%BD%D0%B5)" title="Клас (програмиране) – Bulgarian" lang="bg" hreflang="bg" data-title="Клас (програмиране)" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Klasa_(programiranje)" title="Klasa (programiranje) – Bosnian" lang="bs" hreflang="bs" data-title="Klasa (programiranje)" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Classe_(inform%C3%A0tica)" title="Classe (informàtica) – Catalan" lang="ca" hreflang="ca" data-title="Classe (informàtica)" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/T%C5%99%C3%ADda_(programov%C3%A1n%C3%AD)" title="Třída (programování) – Czech" lang="cs" hreflang="cs" data-title="Třída (programování)" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Klasse_(datalogi)" title="Klasse (datalogi) – Danish" lang="da" hreflang="da" data-title="Klasse (datalogi)" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Klasse_(Objektorientierung)" title="Klasse (Objektorientierung) – German" lang="de" hreflang="de" data-title="Klasse (Objektorientierung)" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Klass_(programmeerimine)" title="Klass (programmeerimine) – Estonian" lang="et" hreflang="et" data-title="Klass (programmeerimine)" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Clase_(inform%C3%A1tica)" title="Clase (informática) – Spanish" lang="es" hreflang="es" data-title="Clase (informática)" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Klaso_(objektema_programado)" title="Klaso (objektema programado) – Esperanto" lang="eo" hreflang="eo" data-title="Klaso (objektema programado)" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%DA%A9%D9%84%D8%A7%D8%B3_(%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C)" title="کلاس (برنامه‌نویسی) – Persian" lang="fa" hreflang="fa" data-title="کلاس (برنامه‌نویسی)" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Classe_(informatique)" title="Classe (informatique) – French" lang="fr" hreflang="fr" data-title="Classe (informatique)" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Clase_sw" title="Clase sw – Galician" lang="gl" hreflang="gl" data-title="Clase sw" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%ED%81%B4%EB%9E%98%EC%8A%A4_(%EC%BB%B4%ED%93%A8%ED%84%B0_%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D)" title="클래스 (컴퓨터 프로그래밍) – Korean" lang="ko" hreflang="ko" data-title="클래스 (컴퓨터 프로그래밍)" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D4%B4%D5%A1%D5%BD_(%D5%AE%D6%80%D5%A1%D5%A3%D6%80%D5%A1%D5%BE%D5%B8%D6%80%D5%B8%D6%82%D5%B4)" title="Դաս (ծրագրավորում) – Armenian" lang="hy" hreflang="hy" data-title="Դաս (ծրագրավորում)" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%95%E0%A5%8D%E0%A4%B2%E0%A4%BE%E0%A4%B8" title="क्लास – Hindi" lang="hi" hreflang="hi" data-title="क्लास" data-language-autonym="हिन्दी" data-language-local-name="Hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Klasa_(programiranje)" title="Klasa (programiranje) – Croatian" lang="hr" hreflang="hr" data-title="Klasa (programiranje)" data-language-autonym="Hrvatski" data-language-local-name="Croatian" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/Klaso_(programifo)" title="Klaso (programifo) – Ido" lang="io" hreflang="io" data-title="Klaso (programifo)" data-language-autonym="Ido" data-language-local-name="Ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Kelas_(ilmu_komputer)" title="Kelas (ilmu komputer) – Indonesian" lang="id" hreflang="id" data-title="Kelas (ilmu komputer)" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/Klasi_(forritun)" title="Klasi (forritun) – Icelandic" lang="is" hreflang="is" data-title="Klasi (forritun)" data-language-autonym="Íslenska" data-language-local-name="Icelandic" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Classe_(informatica)" title="Classe (informatica) – Italian" lang="it" hreflang="it" data-title="Classe (informatica)" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%9E%D7%97%D7%9C%D7%A7%D7%94_(%D7%AA%D7%9B%D7%A0%D7%95%D7%AA)" title="מחלקה (תכנות) – Hebrew" lang="he" hreflang="he" data-title="מחלקה (תכנות)" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81%D1%81" title="Класс – Kazakh" lang="kk" hreflang="kk" data-title="Класс" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-ltg mw-list-item"><a href="https://ltg.wikipedia.org/wiki/Klase" title="Klase – Latgalian" lang="ltg" hreflang="ltg" data-title="Klase" data-language-autonym="Latgaļu" data-language-local-name="Latgalian" class="interlanguage-link-target"><span>Latgaļu</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Klas%C4%97_(programavimas)" title="Klasė (programavimas) – Lithuanian" lang="lt" hreflang="lt" data-title="Klasė (programavimas)" data-language-autonym="Lietuvių" data-language-local-name="Lithuanian" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikipedia.org/wiki/Class(%E1%80%80%E1%80%BD%E1%80%94%E1%80%BA%E1%80%95%E1%80%BB%E1%80%B0%E1%80%90%E1%80%AC)" title="Class(ကွန်ပျူတာ) – Burmese" lang="my" hreflang="my" data-title="Class(ကွန်ပျူတာ)" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="Burmese" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Klasse_(informatica)" title="Klasse (informatica) – Dutch" lang="nl" hreflang="nl" data-title="Klasse (informatica)" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%82%AF%E3%83%A9%E3%82%B9_(%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF)" title="クラス (コンピュータ) – Japanese" lang="ja" hreflang="ja" data-title="クラス (コンピュータ)" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Klasa_(programowanie_obiektowe)" title="Klasa (programowanie obiektowe) – Polish" lang="pl" hreflang="pl" data-title="Klasa (programowanie obiektowe)" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Classe_(programa%C3%A7%C3%A3o)" title="Classe (programação) – Portuguese" lang="pt" hreflang="pt" data-title="Classe (programação)" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Clas%C4%83_(programare)" title="Clasă (programare) – Romanian" lang="ro" hreflang="ro" data-title="Clasă (programare)" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81%D1%81_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)" title="Класс (программирование) – Russian" lang="ru" hreflang="ru" data-title="Класс (программирование)" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Class_(programming)" title="Class (programming) – Simple English" lang="en-simple" hreflang="en-simple" data-title="Class (programming)" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Trieda_(programovanie)" title="Trieda (programovanie) – Slovak" lang="sk" hreflang="sk" data-title="Trieda (programovanie)" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81%D0%B0_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B8%D1%80%D0%B0%D1%9A%D0%B5)" title="Класа (програмирање) – Serbian" lang="sr" hreflang="sr" data-title="Класа (програмирање)" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Klasa_(informatika)" title="Klasa (informatika) – Serbo-Croatian" lang="sh" hreflang="sh" data-title="Klasa (informatika)" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="Serbo-Croatian" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-su mw-list-item"><a href="https://su.wikipedia.org/wiki/Class_(%C3%A9lmu_komputer)" title="Class (élmu komputer) – Sundanese" lang="su" hreflang="su" data-title="Class (élmu komputer)" data-language-autonym="Sunda" data-language-local-name="Sundanese" class="interlanguage-link-target"><span>Sunda</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Luokka_(ohjelmointi)" title="Luokka (ohjelmointi) – Finnish" lang="fi" hreflang="fi" data-title="Luokka (ohjelmointi)" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Klass_(programmering)" title="Klass (programmering) – Swedish" lang="sv" hreflang="sv" data-title="Klass (programmering)" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%B5%E0%AE%95%E0%AF%81%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81_(%E0%AE%95%E0%AE%A3%E0%AE%BF%E0%AE%A9%E0%AE%BF%E0%AE%AF%E0%AE%BF%E0%AE%AF%E0%AE%B2%E0%AF%8D)" title="வகுப்பு (கணினியியல்) – Tamil" lang="ta" hreflang="ta" data-title="வகுப்பு (கணினியியல்)" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%84%E0%B8%A5%E0%B8%B2%E0%B8%AA_(%E0%B8%84%E0%B8%AD%E0%B8%A1%E0%B8%9E%E0%B8%B4%E0%B8%A7%E0%B9%80%E0%B8%95%E0%B8%AD%E0%B8%A3%E0%B9%8C)" title="คลาส (คอมพิวเตอร์) – Thai" lang="th" hreflang="th" data-title="คลาส (คอมพิวเตอร์)" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/S%C4%B1n%C4%B1f_(programlama)" title="Sınıf (programlama) – Turkish" lang="tr" hreflang="tr" data-title="Sınıf (programlama)" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F)" title="Клас (програмування) – Ukrainian" lang="uk" hreflang="uk" data-title="Клас (програмування)" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/L%E1%BB%9Bp_(l%E1%BA%ADp_tr%C3%ACnh_m%C3%A1y_t%C3%ADnh)" title="Lớp (lập trình máy tính) – Vietnamese" lang="vi" hreflang="vi" data-title="Lớp (lập trình máy tính)" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E9%A1%9E%E5%88%A5_(%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8)" title="類別 (電腦科學) – Cantonese" lang="yue" hreflang="yue" data-title="類別 (電腦科學)" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E7%B1%BB_(%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6)" title="类 (计算机科学) – Chinese" lang="zh" hreflang="zh" data-title="类 (计算机科学)" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q4479242#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Class_(computer_programming)" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Class_(computer_programming)" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Class_(computer_programming)"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Class_(computer_programming)"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Class_(computer_programming)" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Class_(computer_programming)" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;oldid=1255112799" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Class_%28computer_programming%29&amp;id=1255112799&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FClass_%28computer_programming%29"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FClass_%28computer_programming%29"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Class_%28computer_programming%29&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Class_(computer_programming)&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q4479242" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Specification of an object</div> <p>In <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>, a <b>class</b> defines the shared aspects of <a href="/wiki/Object_(computer_science)" title="Object (computer science)">objects</a> created from the class. The capabilities of a class differ between <a href="/wiki/Programming_language" title="Programming language">programming languages</a>, but generally the shared aspects consist of state (<a href="/wiki/Variable_(computer_science)" title="Variable (computer science)">variables</a>) and behavior (<a href="/wiki/Method_(computer_programming)" title="Method (computer programming)">methods</a>) that are each either associated with a particular object or with all objects of that class.<sup id="cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199514_1-0" class="reference"><a href="#cite_note-FOOTNOTEGammaHelmJohnsonVlissides199514-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https&#58;//books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18_2-0" class="reference"><a href="#cite_note-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> </p><p>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. </p><p>If the language supports <a href="/wiki/Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a>, a class can be defined based on another class with all of its state and behavior plus additional state and behavior that further specializes the class. The specialized class is a <i>sub-class</i>, and the class it is based on is its <i>superclass</i>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Attributes">Attributes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=1" title="Edit section: Attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Object_lifecycle">Object lifecycle</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=2" title="Edit section: Object lifecycle"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>As an <a href="/wiki/Instance_(computer_science)" title="Instance (computer science)">instance</a> of a class, an object is constructed from a class via <i>instantiation</i>. Memory is allocated and initialized for the object state and a <a href="/wiki/Reference_(computer_science)" title="Reference (computer science)">reference</a> to the object is provided to consuming code. The object is usable until it is destroyed – its state memory is de-allocated. </p><p>Most languages allow for custom logic at lifecycle events via a <a href="/wiki/Constructor_(object-oriented_programming)" title="Constructor (object-oriented programming)">constructor</a> and a <a href="/wiki/Destructor_(computer_programming)" title="Destructor (computer programming)">destructor</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Type">Type</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=3" title="Edit section: Type"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An object expresses <a href="/wiki/Data_type" title="Data type">data type</a> as an interface – the type of each member variable and the signature of each <a href="/wiki/Member_function" class="mw-redirect" title="Member function">member function</a> (method). A class defines an implementation of an interface, and instantiating the class results in an object that exposes the implementation via the interface.<sup id="cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199517_3-0" class="reference"><a href="#cite_note-FOOTNOTEGammaHelmJohnsonVlissides199517-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> In the terms of type theory, a class is an implementation‍&#8212;‌a <i>concrete</i> <a href="/wiki/Data_structure" title="Data structure">data structure</a> and collection of subroutines‍&#8212;‌while a type is an <a href="/wiki/Protocol_(object-oriented_programming)" class="mw-redirect" title="Protocol (object-oriented programming)">interface</a>. Different (concrete) classes can produce objects of the same (abstract) type (depending on type system). For example, the type (interface) <style data-mw-deduplicate="TemplateStyles:r886049734">.mw-parser-output .monospaced{font-family:monospace,monospace}</style><span class="monospaced">Stack</span> might be implemented by <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">SmallStack</span> that is fast for small stacks but scales poorly and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">ScalableStack</span> that scales well but has high overhead for small stacks. </p> <div class="mw-heading mw-heading3"><h3 id="Structure"><span class="anchor" id="PROPERTY"></span>Structure</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=4" title="Edit section: Structure"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File/Frame"><a href="/wiki/File:Oop-uml-class-example.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/1/18/Oop-uml-class-example.png" decoding="async" width="161" height="206" class="mw-file-element" data-file-width="161" data-file-height="206" /></a><figcaption><a href="/wiki/Unified_Modeling_Language" title="Unified Modeling Language">UML</a> notation for classes</figcaption></figure> <p>A class contains <a href="/wiki/Data_(computing)" class="mw-redirect" title="Data (computing)">data</a> <a href="/wiki/Field_(computer_science)" title="Field (computer science)">field</a> descriptions (or <i><a href="/wiki/Property_(programming)" title="Property (programming)">properties</a></i>, <i><a href="/wiki/Field_(computer_science)" title="Field (computer science)">fields</a></i>, <i>data <a href="/wiki/Member_variable" title="Member variable">members</a></i>, or <i><a href="/wiki/Attribute_(computing)" title="Attribute (computing)">attributes</a></i>). These are usually field types and names that will be associated with state variables at program run time; these state variables either belong to the class or specific instances of the class. In most languages, the structure defined by the class determines the layout of the memory used by its instances. Other implementations are possible: for example, objects in <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a> use associative key-value containers.<sup id="cite_ref-pythondata_model_4-0" class="reference"><a href="#cite_note-pythondata_model-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> </p><p>Some programming languages such as Eiffel support specification of <a href="/wiki/Class_invariant" title="Class invariant">invariants</a> as part of the definition of the class, and enforce them through the type system. <a href="/wiki/Encapsulation_(object-oriented_programming)" class="mw-redirect" title="Encapsulation (object-oriented programming)">Encapsulation</a> of state is necessary for being able to enforce the invariants of the class. </p> <div class="mw-heading mw-heading3"><h3 id="Behavior">Behavior</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=5" title="Edit section: Behavior"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Method_(computer_programming)" title="Method (computer programming)">Method (computer programming)</a></div> <p>The behavior of a class or its instances is defined using <a href="/wiki/Method_(computer_programming)" title="Method (computer programming)">methods</a>. Methods are <a href="/wiki/Subroutine" class="mw-redirect" title="Subroutine">subroutines</a> with the ability to operate on objects or classes. These operations may alter the state of an object or simply provide ways of accessing it.<sup id="cite_ref-FOOTNOTEBooch199486-88_5-0" class="reference"><a href="#cite_note-FOOTNOTEBooch199486-88-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> Many kinds of methods exist, but support for them varies across languages. Some types of methods are created and called by programmer code, while other special methods—such as constructors, destructors, and conversion operators—are created and called by compiler-generated code. A language may also allow the programmer to define and call these special methods.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Class_interface">Class interface</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=6" title="Edit section: Class interface"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface (object-oriented programming)</a></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Further information: <a href="/wiki/Interface_(computing)" title="Interface (computing)">Interface (computing)</a></div> <p>Every class <i>implements</i> (or <i>realizes</i>) an interface by providing <a href="#Structure">structure</a> and behavior. Structure consists of data and state, and behavior consists of code that specifies how methods are implemented.<sup id="cite_ref-FOOTNOTEBooch1994105_8-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994105-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> There is a distinction between the definition of an interface and the implementation of that interface; however, this line is blurred in many programming languages because class declarations both define and implement an interface. Some languages, however, provide features that separate interface and implementation. For example, an <a href="#Abstract_and_Concrete">abstract class</a> can define an interface without providing an implementation. </p><p>Languages that support class inheritance also allow classes to inherit interfaces from the classes that they are derived from. </p><p>For example, if "class A" inherits from "class B" and if "class B" implements the interface "interface B" then "class A" also inherits the functionality(constants and methods declaration) provided by "interface B". </p><p>In languages that support <a href="#Information_hiding_and_encapsulation">access specifiers</a>, the interface of a class is considered to be the set of public members of the class, including both methods and attributes (via implicit <a href="/wiki/Mutator_method" title="Mutator method">getter and setter methods</a>); any private members or internal data structures are not intended to be depended on by external code and thus are not part of the interface. </p><p>Object-oriented programming methodology dictates that the operations of any interface of a class are to be independent of each other. It results in a layered design where clients of an interface use the methods declared in the interface. An interface places no requirements for clients to invoke the operations of one interface in any particular order. This approach has the benefit that client code can assume that the operations of an interface are available for use whenever the client has access to the object.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> <sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="Source needed for whole paragraph...this is a rather specific statement about OOP methodology. (April 2012)">citation needed</span></a></i>&#93;</sup> </p> <dl><dt>Class interface example</dt></dl> <p>The buttons on the front of your television set are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to toggle the television on and off. In this example, your particular television is the instance, each method is represented by a button, and all the buttons together compose the interface (other television sets that are the same model as yours would have the same interface). In its most common form, an interface is a specification of a group of related methods without any associated implementation of the methods. </p><p>A television set also has a myriad of <i>attributes</i>, such as size and whether it supports color, which together comprise its structure. A class represents the full description of a television, including its attributes (structure) and buttons (interface). </p><p>Getting the total number of televisions manufactured could be a <i>static method</i> of the television class. This method is associated with the class, yet is outside the domain of each instance of the class. A static method that finds a particular instance out of the set of all television objects is another example. </p> <div class="mw-heading mw-heading3"><h3 id="Member_accessibility">Member accessibility</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=7" title="Edit section: Member accessibility"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">"Private member" redirects here. For other uses, see <a href="/wiki/Private_members_club" class="mw-redirect" title="Private members club">Private members club</a> and <a href="/wiki/Private_member%27s_bill" title="Private member&#39;s bill">Private member's bill</a>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Further information: <a href="/wiki/Information_hiding" title="Information hiding">Information hiding</a></div> <p>The following is a common set of <a href="/wiki/Access_specifiers" class="mw-redirect" title="Access specifiers">access specifiers</a>:<sup id="cite_ref-JavaAccessControl_10-0" class="reference"><a href="#cite_note-JavaAccessControl-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> </p> <ul><li><i>Private</i> (or <i>class-private</i>) restricts access to the class itself. Only methods that are part of the same class can access private members.</li> <li><i>Protected</i> (or <i>class-protected</i>) allows the class itself and all its subclasses to access the member.</li> <li><i>Public</i> means that any code can access the member by its name.</li></ul> <p>Although many object-oriented languages support the above access specifiers,their semantics may differ. </p><p>Object-oriented design uses the access specifiers in conjunction with careful design of public method implementations to enforce class invariants—constraints on the state of the objects. A common usage of access specifiers is to separate the internal data of a class from its interface: the internal structure is made private, while public <a href="/wiki/Accessor_method" class="mw-redirect" title="Accessor method">accessor methods</a> can be used to inspect or alter such private data. </p><p>Access specifiers do not necessarily control <i>visibility</i>, in that even private members may be visible to client external code. In some languages, an inaccessible but visible member may be referred to at runtime (for example, by a pointer returned from a member function), but an attempt to use it by referring to the name of the member from the client code will be prevented by the type checker.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p><p>The various object-oriented programming languages enforce member accessibility and visibility to various degrees, and depending on the language's <a href="/wiki/Type_system" title="Type system">type system</a> and compilation policies, enforced at either <a href="/wiki/Compile_time" title="Compile time">compile time</a> or <a href="/wiki/Runtime_(program_lifecycle_phase)" class="mw-redirect" title="Runtime (program lifecycle phase)">runtime</a>. For example, the <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> language does not allow client code that accesses the private data of a class to compile.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> In the <a href="/wiki/C%2B%2B" title="C++">C++</a> language, private methods are visible, but not accessible in the interface; however, they may be made invisible by explicitly declaring fully abstract classes that represent the interfaces of the class.<sup id="cite_ref-cppinterface_13-0" class="reference"><a href="#cite_note-cppinterface-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p><p>Some languages feature other accessibility schemes: </p> <ul><li><i>Instance vs. class accessibility</i>: <a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> supports <i>instance-private</i> and <i>instance-protected</i> access specifiers in lieu of class-private and class-protected, respectively. They differ in that they restrict access based on the instance itself, rather than the instance's class.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup></li> <li><i>Friend</i>: C++ supports a mechanism where a function explicitly declared as a <a href="/wiki/Friend_function" title="Friend function">friend function</a> of the class may access the members designated as private or protected.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup></li> <li><i>Path-based</i>: Java supports restricting access to a member within a <a href="/wiki/Java_syntax#Access_modifiers" title="Java syntax">Java package</a>, which is the logical path of the file. However, it is a common practice when extending a Java framework to implement classes in the same package as a framework class to access protected members. The source file may exist in a completely different location, and may be deployed to a different .jar file, yet still be in the same logical path as far as the JVM is concerned.<sup id="cite_ref-JavaAccessControl_10-1" class="reference"><a href="#cite_note-JavaAccessControl-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup></li></ul> <div class="mw-heading mw-heading4"><h4 id="Inheritance">Inheritance</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=8" title="Edit section: Inheritance"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main articles: <a href="/wiki/Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">Inheritance (object-oriented programming)</a>, <a href="/wiki/Superclass_(computer_science)" class="mw-redirect" title="Superclass (computer science)">Superclass (computer science)</a>, and <a href="/wiki/Subclass_(computer_science)" class="mw-redirect" title="Subclass (computer science)">Subclass (computer science)</a></div> <p>Conceptually, a superclass is a <a href="/wiki/Superset" class="mw-redirect" title="Superset">superset</a> of its subclasses. For example, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">GraphicObject</span> could be a superclass of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Rectangle</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Ellipse</span>, while <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Square</span> would be a subclass of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Rectangle</span>. These are all <a href="/wiki/Subset" title="Subset">subset relations</a> in set theory as well, i.e., all squares are rectangles but not all rectangles are squares. </p><p>A common conceptual error is to mistake a <i>part of</i> relation with a subclass. For example, a car and truck are both kinds of vehicles and it would be appropriate to model them as subclasses of a vehicle class. However, it would be an error to model the parts of the car as subclass relations. For example, a car is composed of an engine and body, but it would not be appropriate to model an engine or body as a subclass of a car. </p><p>In <a href="/wiki/Object-oriented_modeling" title="Object-oriented modeling">object-oriented modeling</a> these kinds of relations are typically modeled as object properties. In this example, the <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Car</span> class would have a property called <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">parts</span>. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">parts</span> would be typed to hold a collection of objects, such as instances of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Body</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Engine</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Tires</span>, etc. Object modeling languages such as <a href="/wiki/Unified_Modeling_Language" title="Unified Modeling Language">UML</a> include capabilities to model various aspects of "part of" and other kinds of relations – data such as the cardinality of the objects, constraints on input and output values, etc. This information can be utilized by developer tools to generate additional code besides the basic data definitions for the objects, such as error checking on <a href="/wiki/Mutator_method" title="Mutator method">get and set methods</a>.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> </p><p>One important question when modeling and implementing a system of object classes is whether a class can have one or more superclasses. In the real world with actual sets, it would be rare to find sets that did not intersect with more than one other set. However, while some systems such as Flavors and CLOS provide a capability for more than one parent to do so at run time introduces complexity that many in the object-oriented community consider antithetical to the goals of using object classes in the first place. Understanding which class will be responsible for handling a message can get complex when dealing with more than one superclass. If used carelessly this feature can introduce some of the same system complexity and ambiguity classes were designed to avoid.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> </p><p>Most modern object-oriented languages such as Smalltalk and Java require single inheritance at run time. For these languages, multiple inheritance may be useful for modeling but not for an implementation. </p><p>However, <a href="/wiki/Semantic_web" class="mw-redirect" title="Semantic web">semantic web</a> application objects do have multiple superclasses. The volatility of the Internet requires this level of flexibility and the technology standards such as the <a href="/wiki/Web_Ontology_Language" title="Web Ontology Language">Web Ontology Language (OWL)</a> are designed to support it. </p><p>A similar issue is whether or not the class hierarchy can be modified at run time. Languages such as Flavors, CLOS, and Smalltalk all support this feature as part of their <a href="/wiki/Meta-object_protocol" class="mw-redirect" title="Meta-object protocol">meta-object protocols</a>. Since classes are themselves first-class objects, it is possible to have them dynamically alter their structure by sending them the appropriate messages. Other languages that focus more on strong typing such as Java and C++ do not allow the class hierarchy to be modified at run time. Semantic web objects have the capability for run time changes to classes. The rationale is similar to the justification for allowing multiple superclasses, that the Internet is so dynamic and flexible that dynamic changes to the hierarchy are required to manage this volatility.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> </p><p>Although many class-based languages support inheritance, inheritance is not an intrinsic aspect of classes. An <a href="/wiki/Object-based_language" title="Object-based language">object-based language</a> (i.e. <a href="/wiki/Classic_Visual_Basic" class="mw-redirect" title="Classic Visual Basic">Classic Visual Basic</a>) supports classes yet does not support inheritance. </p> <div class="mw-heading mw-heading2"><h2 id="Inter-class_relationships">Inter-class relationships</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=9" title="Edit section: Inter-class relationships"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A programming language may support various class relationship features. </p> <div class="mw-heading mw-heading3"><h3 id="Compositional">Compositional</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=10" title="Edit section: Compositional"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Classes can be composed of other classes, thereby establishing a compositional relationship between the enclosing class and its embedded classes. Compositional relationship between classes is also commonly known as a <i><a href="/wiki/Has-a" title="Has-a">has-a</a></i> relationship.<sup id="cite_ref-FOOTNOTEBooch1994180_19-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994180-19"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> For example, a class "Car" could be composed of and contain a class "Engine". Therefore, a Car <i>has an</i> Engine. One aspect of composition is containment, which is the enclosure of component instances by the instance that has them. If an enclosing object contains component instances by value, the components and their enclosing object have a similar <a href="/wiki/Object_lifetime" title="Object lifetime">lifetime</a>. If the components are contained by reference, they may not have a similar lifetime.<sup id="cite_ref-FOOTNOTEBooch1994128-129_20-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994128-129-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> For example, in Objective-C 2.0: </p> <div class="mw-highlight mw-highlight-lang-objc mw-content-ltr" dir="ltr"><pre><span></span><span class="k">@interface</span> <span class="nc">Car</span>&#160;: <span class="bp">NSObject</span> <span class="k">@property</span><span class="w"> </span><span class="bp">NSString</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> <span class="k">@property</span><span class="w"> </span><span class="n">Engine</span><span class="w"> </span><span class="o">*</span><span class="n">engine</span> <span class="k">@property</span><span class="w"> </span><span class="bp">NSArray</span><span class="w"> </span><span class="o">*</span><span class="n">tires</span><span class="p">;</span> <span class="k">@end</span> </pre></div> <p>This <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Car</span> class <i>has</i> an instance of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">NSString</span> (a <a href="/wiki/String_(computer_science)" title="String (computer science)">string</a> object), <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">Engine</span>, and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">NSArray</span> (an array object). </p> <div class="mw-heading mw-heading3"><h3 id="Hierarchical">Hierarchical</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=11" title="Edit section: Hierarchical"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Classes can be <i>derived</i> from one or more existing classes, thereby establishing a hierarchical relationship between the derived-from classes (<i>base classes</i>, <i>parent classes</i> or <i><style data-mw-deduplicate="TemplateStyles:r1238216509">.mw-parser-output .vanchor>:target~.vanchor-text{background-color:#b1d2ff}@media screen{html.skin-theme-clientpref-night .mw-parser-output .vanchor>:target~.vanchor-text{background-color:#0f4dc9}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .vanchor>:target~.vanchor-text{background-color:#0f4dc9}}</style><span class="vanchor"><span id="superclasses"></span><span id="SUPERCLASS"></span><span class="vanchor-text">superclasses</span></span></i>) and the derived class (<i>child class</i> or <i>subclass</i>) . The relationship of the derived class to the derived-from classes is commonly known as an <i><a href="/wiki/Is-a" title="Is-a">is-a</a></i> relationship.<sup id="cite_ref-FOOTNOTEBooch1994112_21-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994112-21"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> For example, a class 'Button' could be derived from a class 'Control'. Therefore, a Button <i>is a</i> Control. Structural and behavioral members of the parent classes are <i>inherited</i> by the child class. Derived classes can define additional structural members (data fields) and behavioral members (methods) in addition to those that they <i>inherit</i> and are therefore <i>specializations</i> of their superclasses. Also, derived classes can <a href="/wiki/Method_overriding" title="Method overriding">override</a> inherited methods if the language allows. </p><p>Not all languages support multiple inheritance. For example, Java allows a class to implement multiple interfaces, but only inherit from one class.<sup id="cite_ref-javainterface_22-0" class="reference"><a href="#cite_note-javainterface-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup> If multiple inheritance is allowed, the hierarchy is a <a href="/wiki/Directed_acyclic_graph" title="Directed acyclic graph">directed acyclic graph</a> (or DAG for short), otherwise it is a <a href="/wiki/Tree_(graph_theory)" title="Tree (graph theory)">tree</a>. The hierarchy has classes as nodes and inheritance relationships as links. Classes in the same level are more likely to be <a href="/wiki/Association_(object-oriented_programming)" title="Association (object-oriented programming)">associated</a> than classes in different levels. The levels of this hierarchy are called <a href="/wiki/Layer_(object-oriented_design)" title="Layer (object-oriented design)">layers</a> or levels of abstraction. </p><p>Example (Simplified Objective-C 2.0 code, from iPhone SDK): </p> <div class="mw-highlight mw-highlight-lang-objc mw-content-ltr" dir="ltr"><pre><span></span><span class="k">@interface</span> <span class="bp">UIResponder</span>&#160;: <span class="bp">NSObject</span><span class="w"> </span><span class="c1">//...</span> <span class="k">@interface</span> <span class="bp">UIView</span>&#160;: <span class="bp">UIResponder</span><span class="w"> </span><span class="c1">//...</span> <span class="k">@interface</span> <span class="bp">UIScrollView</span>&#160;: <span class="bp">UIView</span><span class="w"> </span><span class="c1">//...</span> <span class="k">@interface</span> <span class="bp">UITableView</span>&#160;: <span class="bp">UIScrollView</span><span class="w"> </span><span class="c1">//...</span> </pre></div> <p>In this example, a UITableView <i>is a</i> UIScrollView <i>is a</i> UIView <i>is a</i> UIResponder <i>is an</i> NSObject. </p> <div class="mw-heading mw-heading3"><h3 id="Modeling">Modeling</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=12" title="Edit section: Modeling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/Object-oriented_analysis_and_design" title="Object-oriented analysis and design">object-oriented analysis</a> and in <a href="/wiki/Unified_Modelling_Language" class="mw-redirect" title="Unified Modelling Language">Unified Modelling Language</a> (UML), an <a href="/wiki/Association_(object-oriented_programming)" title="Association (object-oriented programming)">association</a> between two classes represents a collaboration between the classes or their corresponding instances. Associations have direction; for example, a bi-directional association between two classes indicates that both of the classes are aware of their relationship.<sup id="cite_ref-ibmuml_23-0" class="reference"><a href="#cite_note-ibmuml-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup> Associations may be labeled according to their name or purpose.<sup id="cite_ref-FOOTNOTEBooch1994179_24-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994179-24"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> </p><p>An association role is given end of an association and describes the role of the corresponding class. For example, a "subscriber" role describes the way instances of the class "Person" participate in a "subscribes-to" association with the class "Magazine". Also, a "Magazine" has the "subscribed magazine" role in the same association. Association role multiplicity describes how many instances correspond to each instance of the other class of the association. Common multiplicities are "0..1", "1..1", "1..*" and "0..*", where the "*" specifies any number of instances.<sup id="cite_ref-ibmuml_23-1" class="reference"><a href="#cite_note-ibmuml-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Taxonomy">Taxonomy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=13" title="Edit section: Taxonomy"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are many categories of classes, some of which overlap. </p> <div class="mw-heading mw-heading3"><h3 id="Abstract_and_concrete">Abstract and concrete</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=14" title="Edit section: Abstract and concrete"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="Abstract_and_concrete_classes"></span><span class="anchor" id="Abstract_and_Concrete"></span> </p> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">See also: <a href="/wiki/Abstract_type" title="Abstract type">Abstract type</a></div> <p>In a language that supports inheritance, an <i>abstract class</i>, or <i>abstract base class</i> (<i>ABC</i>), is a class that cannot be directly instantiated. By contrast, a <i>concrete class</i> is a class that <em>can</em> be directly instantiated. Instantiation of an abstract class can occur only indirectly, via a concrete <em>sub</em>class. </p><p>An abstract class is either labeled as such explicitly or it may simply specify <i><a href="/wiki/Abstract_method" class="mw-redirect" title="Abstract method">abstract methods</a></i> (or <i><a href="/wiki/Virtual_method" class="mw-redirect" title="Virtual method">virtual methods</a></i>). An abstract class may provide implementations of some methods, and may also specify virtual methods via <a href="/wiki/Type_signature" title="Type signature">signatures</a> that are to be implemented by direct or indirect descendants of the abstract class. Before a class derived from an abstract class can be instantiated, all abstract methods of its parent classes must be implemented by some class in the derivation chain.<sup id="cite_ref-cpppoly_25-0" class="reference"><a href="#cite_note-cpppoly-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> </p><p>Most object-oriented programming languages allow the programmer to specify which classes are considered abstract and will not allow these to be instantiated. For example, in <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a> and <a href="/wiki/PHP" title="PHP">PHP</a>, the keyword <i>abstract</i> is used.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup> In <a href="/wiki/C%2B%2B" title="C++">C++</a>, an abstract class is a class having at least one abstract method given by the appropriate syntax in that language (a pure virtual function in C++ parlance).<sup id="cite_ref-cpppoly_25-1" class="reference"><a href="#cite_note-cpppoly-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> </p><p>A class consisting of only pure virtual methods is called a <i>pure abstract base class</i> (or <i>pure ABC</i>) in C++ and is also known as an <i>interface</i> by users of the language.<sup id="cite_ref-cppinterface_13-1" class="reference"><a href="#cite_note-cppinterface-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> Other languages, notably Java and C#, support a variant of abstract classes called an <a href="/wiki/Interface_(Java)" title="Interface (Java)">interface</a> via a keyword in the language. In these languages, <a href="/wiki/Multiple_inheritance" title="Multiple inheritance">multiple inheritance</a> is not allowed, but a class can implement multiple interfaces. Such a class can only contain abstract publicly accessible methods.<sup id="cite_ref-javainterface_22-1" class="reference"><a href="#cite_note-javainterface-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Local_and_inner">Local and inner</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=15" title="Edit section: Local and inner"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In some languages, classes can be declared in <a href="/wiki/Scope_(programming)" class="mw-redirect" title="Scope (programming)">scopes</a> other than the global scope. There are various types of such classes. </p><p>An <i><a href="/wiki/Inner_class" title="Inner class">inner class</a></i> is a class defined within another class. The relationship between an inner class and its containing class can also be treated as another type of class association. An inner class is typically neither associated with instances of the enclosing class nor instantiated along with its enclosing class. Depending on the language, it may or may not be possible to refer to the class from outside the enclosing class. A related concept is <i>inner types</i>, also known as <i>inner data type</i> or <i>nested type</i>, which is a generalization of the concept of inner classes. <a href="/wiki/C%2B%2B" title="C++">C++</a> is an example of a language that supports both inner classes and inner types (via <i><a href="/wiki/Typedef" title="Typedef">typedef</a></i> declarations).<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">&#91;</span>30<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">&#91;</span>31<span class="cite-bracket">&#93;</span></a></sup> </p><p>A <i>local class</i> is a class defined within a procedure or function. Such structure limits references to the class name to within the scope where the class is declared. Depending on the semantic rules of the language, there may be additional restrictions on local classes compared to non-local ones. One common restriction is to disallow local class methods to access local variables of the enclosing function. For example, in C++, a local class may refer to <a href="/wiki/Static_variable" title="Static variable">static variables</a> declared within its enclosing function, but may not access the function's <a href="/wiki/Automatic_variable" title="Automatic variable">automatic variables</a>.<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">&#91;</span>32<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Metaclass">Metaclass</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=16" title="Edit section: Metaclass"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Metaclass" title="Metaclass">Metaclass</a></div> <p>A metaclass is a class where instances are classes.<sup id="cite_ref-FOOTNOTEBooch1994133-134_33-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994133-134-33"><span class="cite-bracket">&#91;</span>33<span class="cite-bracket">&#93;</span></a></sup> A metaclass describes a common structure of a collection of classes and can implement a <a href="/wiki/Design_pattern_(computer_science)" class="mw-redirect" title="Design pattern (computer science)">design pattern</a> or describe particular kinds of classes. Metaclasses are often used to describe <a href="/wiki/Software_framework" title="Software framework">frameworks</a>.<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">&#91;</span>34<span class="cite-bracket">&#93;</span></a></sup> </p><p>In some languages, such as <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> or <a href="/wiki/Smalltalk" title="Smalltalk">Smalltalk</a>, a class is also an object; thus each class is an instance of a unique metaclass that is built into the language.<sup id="cite_ref-pythondata_model_4-1" class="reference"><a href="#cite_note-pythondata_model-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">&#91;</span>35<span class="cite-bracket">&#93;</span></a></sup> <sup id="cite_ref-FOOTNOTEBooch1994134_36-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994134-36"><span class="cite-bracket">&#91;</span>36<span class="cite-bracket">&#93;</span></a></sup> The <a href="/wiki/Common_Lisp_Object_System" title="Common Lisp Object System">Common Lisp Object System</a> (CLOS) provides <a href="/wiki/Metaobject" title="Metaobject">metaobject protocols</a> (MOPs) to implement those classes and metaclasses.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">&#91;</span>37<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Sealed">Sealed</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=17" title="Edit section: Sealed"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="Non-subclassable"></span><span class="anchor" id="Sealed"></span> A sealed class cannot be subclassed. It is basically the opposite of an <i>abstract</i> class, which must be derived to be used. A sealed class is implicitly <i>concrete</i>. </p><p>A class declared as sealed via the keyword <code class="mw-highlight mw-highlight-lang-csharp mw-content-ltr" style="" dir="ltr"><span class="k">sealed</span></code> in C# or <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" style="" dir="ltr"><span class="kd">final</span></code> in Java or PHP.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">&#91;</span>38<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">&#91;</span>39<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">&#91;</span>40<span class="cite-bracket">&#93;</span></a></sup> </p><p>For example, Java's <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><span class="n">String</span></code> class is marked as <i>final</i>.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">&#91;</span>41<span class="cite-bracket">&#93;</span></a></sup> </p><p>Sealed classes may allow a compiler to perform optimizations that are not available for classes that can be subclassed.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">&#91;</span>42<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Open">Open</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=18" title="Edit section: Open"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An open class can be changed. Typically, an <a href="/wiki/Executable_program" class="mw-redirect" title="Executable program">executable program</a> cannot be changed by customers. Developers can often change some classes, but typically cannot change standard or built-in ones. In <a href="/wiki/Ruby_(programming_language)#Open_classes" title="Ruby (programming language)">Ruby</a>, all classes are open. In <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>, classes can be created at runtime, and all can be modified afterward.<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">&#91;</span>43<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Objective-C#Categories" title="Objective-C">Objective-C categories</a> permit the programmer to add methods to an existing class without the need to recompile that class or even have access to its source code. </p> <div class="mw-heading mw-heading3"><h3 id="Mixin">Mixin</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=19" title="Edit section: Mixin"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some languages have special support for <a href="/wiki/Mixin" title="Mixin">mixins</a>, though, in any language with multiple inheritance, a mixin is simply a class that does not represent an is-a-type-of relationship. Mixins are typically used to add the same methods to multiple classes; for example, a class <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">UnicodeConversionMixin</span> might provide a method called <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">unicode_to_ascii</span> when included in classes <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">FileReader</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">WebPageScraper</span> that do not share a common parent. </p> <div class="mw-heading mw-heading3"><h3 id="Partial">Partial</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=20" title="Edit section: Partial"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-Unreferenced_section plainlinks metadata ambox ambox-content ambox-Unreferenced" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This section <b>does not <a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources">cite</a> any <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">sources</a></b>.<span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Class_(computer_programming)" title="Special:EditPage/Class (computer programming)">improve this section</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">adding citations to reliable sources</a>. Unsourced material may be challenged and <a href="/wiki/Wikipedia:Verifiability#Burden_of_evidence" title="Wikipedia:Verifiability">removed</a>.</span> <span class="date-container"><i>(<span class="date">April 2012</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <p>In languages supporting the feature, a <i>partial class</i> is a class whose definition may be split into multiple pieces, within a single <a href="/wiki/Source_code" title="Source code">source-code</a> file or across multiple files.<sup id="cite_ref-mspartial_44-0" class="reference"><a href="#cite_note-mspartial-44"><span class="cite-bracket">&#91;</span>44<span class="cite-bracket">&#93;</span></a></sup> The pieces are merged at compile time, making compiler output the same as for a non-partial class. </p><p>The primary motivation for the introduction of partial classes is to facilitate the implementation of <a href="/wiki/Automatic_programming" title="Automatic programming">code generators</a>, such as <a href="/wiki/Visual_designer" class="mw-redirect" title="Visual designer">visual designers</a>.<sup id="cite_ref-mspartial_44-1" class="reference"><a href="#cite_note-mspartial-44"><span class="cite-bracket">&#91;</span>44<span class="cite-bracket">&#93;</span></a></sup> It is otherwise a challenge or compromise to develop code generators that can manage the generated code when it is interleaved within developer-written code. Using partial classes, a code generator can process a separate file or coarse-grained partial class within a file, and is thus alleviated from intricately interjecting generated code via extensive parsing, increasing compiler efficiency and eliminating the potential risk of corrupting developer code. In a simple implementation of partial classes, the compiler can perform a phase of <a href="/wiki/Precompilation" class="mw-redirect" title="Precompilation">precompilation</a> where it "unifies" all the parts of a partial class. Then, compilation can proceed as usual. </p><p>Other benefits and effects of the partial class feature include: </p> <ul><li>Enables separation of a class's interface and implementation code in a unique way.</li> <li>Eases navigation through large classes within an <a href="/wiki/Source_code_editor" class="mw-redirect" title="Source code editor">editor</a>.</li> <li>Enables <a href="/wiki/Separation_of_concerns" title="Separation of concerns">separation of concerns</a>, in a way similar to <a href="/wiki/Aspect-oriented_programming" title="Aspect-oriented programming">aspect-oriented programming</a> but without using any extra tools.</li> <li>Enables multiple developers to work on a single class concurrently without the need to merge individual code into one file at a later time.</li></ul> <p>Partial classes have existed in <a href="/wiki/Smalltalk" title="Smalltalk">Smalltalk</a> under the name of <i>Class Extensions</i> for considerable time. With the arrival of the <a href="/wiki/.NET_Framework" title=".NET Framework">.NET framework 2</a>, <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a> introduced partial classes, supported in both <a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a> 2.0 and <a href="/wiki/Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic 2005</a>. <a href="/wiki/WinRT" class="mw-redirect" title="WinRT">WinRT</a> also supports partial classes. </p> <div class="mw-heading mw-heading3"><h3 id="Uninstantiable">Uninstantiable</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=21" title="Edit section: Uninstantiable"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><i>Uninstantiable classes</i> allow programmers to group together per-class fields and methods that are accessible at runtime without an instance of the class. Indeed, instantiation is prohibited for this kind of class. </p><p>For example, in C#, a class marked "static" can not be instantiated, can only have static members (fields, methods, other), may not have <i>instance constructors</i>, and is <i>sealed</i>. <sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">&#91;</span>45<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Unnamed">Unnamed</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=22" title="Edit section: Unnamed"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An <i>unnamed class</i> or <i>anonymous class</i> is not bound to a name or identifier upon definition.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">&#91;</span>46<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">&#91;</span>47<span class="cite-bracket">&#93;</span></a></sup> This is analogous to named versus <a href="/wiki/Anonymous_function" title="Anonymous function">unnamed functions</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Benefits">Benefits</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=23" title="Edit section: Benefits"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The benefits of organizing software into object classes fall into three categories:<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">&#91;</span>48<span class="cite-bracket">&#93;</span></a></sup> </p> <ul><li>Rapid development</li> <li>Ease of maintenance</li> <li>Reuse of code and designs</li></ul> <p>Object classes facilitate rapid development because they lessen the semantic gap between the code and the users. System analysts can talk to both developers and users using essentially the same vocabulary, talking about accounts, customers, bills, etc. Object classes often facilitate rapid development because most object-oriented environments come with powerful debugging and testing tools. Instances of classes can be inspected at run time to verify that the system is performing as expected. Also, rather than get dumps of core memory, most object-oriented environments have interpreted debugging capabilities so that the developer can analyze exactly where in the program the error occurred and can see which methods were called to which arguments and with what arguments.<sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">&#91;</span>49<span class="cite-bracket">&#93;</span></a></sup> </p><p>Object classes facilitate ease of maintenance via encapsulation. When developers need to change the behavior of an object they can localize the change to just that object and its component parts. This reduces the potential for unwanted side effects from maintenance enhancements. </p><p>Software reuse is also a major benefit of using Object classes. Classes facilitate re-use via inheritance and interfaces. When a new behavior is required it can often be achieved by creating a new class and having that class inherit the default behaviors and data of its superclass and then tailoring some aspect of the behavior or data accordingly. Re-use via interfaces (also known as methods) occurs when another object wants to invoke (rather than create a new kind of) some object class. This method for re-use removes many of the common errors that can make their way into software when one program re-uses code from another.<sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">&#91;</span>50<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Runtime_representation">Runtime representation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=24" title="Edit section: Runtime representation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-More_citations_needed plainlinks metadata ambox ambox-content ambox-Refimprove" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This Runtime representation <b>needs additional citations for <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">verification</a></b>.<span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Class_(computer_programming)" title="Special:EditPage/Class (computer programming)">improve this article</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">adding citations to reliable sources</a>&#32;in this Runtime representation. Unsourced material may be challenged and removed.<br /><small><span class="plainlinks"><i>Find sources:</i>&#160;<a rel="nofollow" class="external text" href="https://www.google.com/search?as_eq=wikipedia&amp;q=%22Class%22+computer+programming">"Class"&#160;computer programming</a>&#160;–&#160;<a rel="nofollow" class="external text" href="https://www.google.com/search?tbm=nws&amp;q=%22Class%22+computer+programming+-wikipedia&amp;tbs=ar:1">news</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?&amp;q=%22Class%22+computer+programming&amp;tbs=bkt:s&amp;tbm=bks">newspapers</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?tbs=bks:1&amp;q=%22Class%22+computer+programming+-wikipedia">books</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://scholar.google.com/scholar?q=%22Class%22+computer+programming">scholar</a>&#160;<b>·</b> <a rel="nofollow" class="external text" href="https://www.jstor.org/action/doBasicSearch?Query=%22Class%22+computer+programming&amp;acc=on&amp;wc=on">JSTOR</a></span></small></span> <span class="date-container"><i>(<span class="date">May 2024</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <p>As a data type, a class is usually considered as a compile time construct.<sup id="cite_ref-51" class="reference"><a href="#cite_note-51"><span class="cite-bracket">&#91;</span>51<span class="cite-bracket">&#93;</span></a></sup> A language or library may also support <a href="/wiki/Prototype-based_programming" title="Prototype-based programming">prototype</a> or <a href="/wiki/Factory_method_pattern" title="Factory method pattern">factory</a> <a href="/wiki/Metaobject" title="Metaobject">metaobjects</a> that represent runtime information about classes, or even represent metadata that provides access to <a href="/wiki/Reflective_programming" title="Reflective programming">reflective programming</a> (reflection) facilities and ability to manipulate data structure formats at runtime. Many languages distinguish this kind of <a href="/wiki/Run-time_type_information" title="Run-time type information">run-time type information</a> about classes from a class on the basis that the information is not needed at runtime. Some dynamic languages do not make strict distinctions between runtime and compile time constructs, and therefore may not distinguish between metaobjects and classes. </p><p>For example, if Human is a <a href="/wiki/Metaobject" title="Metaobject">metaobject</a> representing the class Person, then instances of class Person can be created by using the facilities of the Human <a href="/wiki/Metaobject" title="Metaobject">metaobject</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Prototype-based_programming">Prototype-based programming</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=25" title="Edit section: Prototype-based programming"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In contrast to creating an object from a class, some programming contexts support object creation by copying (cloning) a <a href="/wiki/Prototype-based_programming" title="Prototype-based programming">prototype</a> object.<sup id="cite_ref-52" class="reference"><a href="#cite_note-52"><span class="cite-bracket">&#91;</span>52<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=26" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239009302">.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{clear:left;float:left;margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}</style><ul role="navigation" aria-label="Portals" class="noprint portalbox portalborder portalright"> <li class="portalbox-entry"><span class="portalbox-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Octicons-terminal.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/24px-Octicons-terminal.svg.png" decoding="async" width="24" height="28" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/37px-Octicons-terminal.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/49px-Octicons-terminal.svg.png 2x" data-file-width="896" data-file-height="1024" /></a></span></span><span class="portalbox-link"><a href="/wiki/Portal:Computer_programming" title="Portal:Computer programming">Computer programming portal</a></span></li></ul> <ul><li><a href="/wiki/Class_diagram" title="Class diagram">Class diagram</a>&#160;– Diagram that describes the static structure of a software system</li> <li><a href="/wiki/Class_variable" title="Class variable">Class variable</a>&#160;– Variable defined in a class whose objects all possess the same copy</li> <li><a href="/wiki/Instance_variable" title="Instance variable">Instance variable</a>&#160;– Member variable of a class that all its objects possess a copy of</li> <li><a href="/wiki/List_of_object-oriented_programming_languages" title="List of object-oriented programming languages">List of object-oriented programming languages</a></li> <li><a href="/wiki/Trait_(computer_programming)" title="Trait (computer programming)">Trait (computer programming)</a>&#160;– Set of methods that extend the functionality of a class</li></ul> <div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=27" title="Edit section: Notes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-lower-alpha"> </div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239543626"><div class="reflist reflist-columns references-column-width" style="column-width: 30em;"> <ol class="references"> <li id="cite_note-FOOTNOTEGammaHelmJohnsonVlissides199514-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199514_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGammaHelmJohnsonVlissides1995">Gamma et al. 1995</a>, p.&#160;14.</span> </li> <li id="cite_note-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https&#58;//books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18_2-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBruce2002">Bruce 2002</a>, 2.1 Objects, classes, and object types, <a rel="nofollow" class="external free" href="https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18">https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18</a>.</span> </li> <li id="cite_note-FOOTNOTEGammaHelmJohnsonVlissides199517-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199517_3-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGammaHelmJohnsonVlissides1995">Gamma et al. 1995</a>, p.&#160;17.</span> </li> <li id="cite_note-pythondata_model-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-pythondata_model_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-pythondata_model_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/reference/datamodel.html">"3. Data model"</a>. <i>The Python Language Reference</i>. Python Software Foundation<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Python+Language+Reference&amp;rft.atitle=3.+Data+model&amp;rft_id=https%3A%2F%2Fdocs.python.org%2Freference%2Fdatamodel.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch199486-88-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch199486-88_5-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;86-88.</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/classes/">"Classes (I)"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-29</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%2B%2B+Language+Tutorial&amp;rft.atitle=Classes+%28I%29&amp;rft_id=http%3A%2F%2Fwww.cplusplus.com%2Fdoc%2Ftutorial%2Fclasses%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/classes2/">"Classes (II)"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-29</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%2B%2B+Language+Tutorial&amp;rft.atitle=Classes+%28II%29&amp;rft_id=http%3A%2F%2Fwww.cplusplus.com%2Fdoc%2Ftutorial%2Fclasses2%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch1994105-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994105_8-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;105.</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFParsons2015" class="citation book cs1">Parsons, June Jamrich (2015-06-22). <i>New Perspectives on Computer Concepts 2016, Comprehensive</i>. Boston, MA: Cengage Learning. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9781305271616" title="Special:BookSources/9781305271616"><bdi>9781305271616</bdi></a>. <a href="/wiki/OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&#160;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/917155105">917155105</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=New+Perspectives+on+Computer+Concepts+2016%2C+Comprehensive&amp;rft.place=Boston%2C+MA&amp;rft.pub=Cengage+Learning&amp;rft.date=2015-06-22&amp;rft_id=info%3Aoclcnum%2F917155105&amp;rft.isbn=9781305271616&amp;rft.aulast=Parsons&amp;rft.aufirst=June+Jamrich&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-JavaAccessControl-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-JavaAccessControl_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-JavaAccessControl_10-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html">"Controlling Access to Members of a Class"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-19</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Java+Tutorials&amp;rft.atitle=Controlling+Access+to+Members+of+a+Class&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2FjavaOO%2Faccesscontrol.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20151003162754/https://www.securecoding.cert.org/confluence/display/cplusplus/OOP08-CPP.+Do+not+return+references+to+private+data">"OOP08-CPP. Do not return references to private data"</a>. <i>CERT C++ Secure Coding Standard</i>. Carnegie Mellon University. 2010-05-10. Archived from <a rel="nofollow" class="external text" href="https://www.securecoding.cert.org/confluence/display/cplusplus/OOP08-CPP.+Do+not+return+references+to+private+data">the original</a> on 2015-10-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=CERT+C%2B%2B+Secure+Coding+Standard&amp;rft.atitle=OOP08-CPP.+Do+not+return+references+to+private+data&amp;rft.date=2010-05-10&amp;rft_id=https%3A%2F%2Fwww.securecoding.cert.org%2Fconfluence%2Fdisplay%2Fcplusplus%2FOOP08-CPP.%2BDo%2Bnot%2Breturn%2Breferences%2Bto%2Bprivate%2Bdata&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBen-Ari2007" class="citation web cs1">Ben-Ari, Mordechai (2007-01-24). <a rel="nofollow" class="external text" href="http://introcs.cs.princeton.edu/java/11cheatsheet/errors.pdf">"2.2 Identifiers"</a> <span class="cs1-format">(PDF)</span>. <i>Compile and Runtime Errors in Java</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20111018094803/http://introcs.cs.princeton.edu/java/11cheatsheet/errors.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2011-10-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Compile+and+Runtime+Errors+in+Java&amp;rft.atitle=2.2+Identifiers&amp;rft.date=2007-01-24&amp;rft.aulast=Ben-Ari&amp;rft.aufirst=Mordechai&amp;rft_id=http%3A%2F%2Fintrocs.cs.princeton.edu%2Fjava%2F11cheatsheet%2Ferrors.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-cppinterface-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-cppinterface_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cppinterface_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWild" class="citation web cs1">Wild, Fred. <a rel="nofollow" class="external text" href="http://www.drdobbs.com/cpp/184410630">"C++ Interfaces"</a>. <i>Dr. Dobb's</i>. UBM Techweb<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Dr.+Dobb%27s&amp;rft.atitle=C%2B%2B+Interfaces&amp;rft.aulast=Wild&amp;rft.aufirst=Fred&amp;rft_id=http%3A%2F%2Fwww.drdobbs.com%2Fcpp%2F184410630&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFThomasHunt" class="citation web cs1">Thomas; Hunt. <a rel="nofollow" class="external text" href="http://ruby-doc.org/docs/ProgrammingRuby/html/tut_classes.html">"Classes, Objects, and Variables"</a>. <i>Programming Ruby: The Pragmatic Programmer's Guide</i>. Ruby-Doc.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Programming+Ruby%3A+The+Pragmatic+Programmer%27s+Guide&amp;rft.atitle=Classes%2C+Objects%2C+and+Variables&amp;rft.au=Thomas&amp;rft.au=Hunt&amp;rft_id=http%3A%2F%2Fruby-doc.org%2Fdocs%2FProgrammingRuby%2Fhtml%2Ftut_classes.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/inheritance/">"Friendship and inheritance"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%2B%2B+Language+Tutorial&amp;rft.atitle=Friendship+and+inheritance&amp;rft_id=http%3A%2F%2Fwww.cplusplus.com%2Fdoc%2Ftutorial%2Finheritance%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerfeld2008" class="citation web cs1">Berfeld, Marya (2 December 2008). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/rational/library/08/1202_berfeld/">"UML-to-Java transformation in IBM Rational Software Architect editions and related software"</a>. <a href="/wiki/IBM" title="IBM">IBM</a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 December</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=UML-to-Java+transformation+in+IBM+Rational+Software+Architect+editions+and+related+software&amp;rft.pub=IBM&amp;rft.date=2008-12-02&amp;rft.aulast=Berfeld&amp;rft.aufirst=Marya&amp;rft_id=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Frational%2Flibrary%2F08%2F1202_berfeld%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJacobsenMagnus_ChristersonPatrik_JonssonGunnar_Overgaard1992" class="citation book cs1">Jacobsen, Ivar; Magnus Christerson; Patrik Jonsson; Gunnar Overgaard (1992). <a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco/page/43"><i>Object Oriented Software Engineering</i></a>. Addison-Wesley ACM Press. pp.&#160;<a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco/page/43">43–69</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-54435-0" title="Special:BookSources/0-201-54435-0"><bdi>0-201-54435-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Object+Oriented+Software+Engineering&amp;rft.pages=43-69&amp;rft.pub=Addison-Wesley+ACM+Press&amp;rft.date=1992&amp;rft.isbn=0-201-54435-0&amp;rft.aulast=Jacobsen&amp;rft.aufirst=Ivar&amp;rft.au=Magnus+Christerson&amp;rft.au=Patrik+Jonsson&amp;rft.au=Gunnar+Overgaard&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fobjectorientedso00jaco%2Fpage%2F43&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKnublauchOberleTetlowWallace2006" class="citation web cs1">Knublauch, Holger; Oberle, Daniel; Tetlow, Phil; Wallace, Evan (2006-03-09). <a rel="nofollow" class="external text" href="http://www.w3.org/2001/sw/BestPractices/SE/ODSD/">"A Semantic Web Primer for Object-Oriented Software Developers"</a>. <a href="/wiki/W3C" class="mw-redirect" title="W3C">W3C</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2008-07-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=A+Semantic+Web+Primer+for+Object-Oriented+Software+Developers&amp;rft.pub=W3C&amp;rft.date=2006-03-09&amp;rft.aulast=Knublauch&amp;rft.aufirst=Holger&amp;rft.au=Oberle%2C+Daniel&amp;rft.au=Tetlow%2C+Phil&amp;rft.au=Wallace%2C+Evan&amp;rft_id=http%3A%2F%2Fwww.w3.org%2F2001%2Fsw%2FBestPractices%2FSE%2FODSD%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch1994180-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994180_19-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;180.</span> </li> <li id="cite_note-FOOTNOTEBooch1994128-129-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994128-129_20-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;128-129.</span> </li> <li id="cite_note-FOOTNOTEBooch1994112-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994112_21-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;112.</span> </li> <li id="cite_note-javainterface-22"><span class="mw-cite-backlink">^ <a href="#cite_ref-javainterface_22-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-javainterface_22-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/IandI/createinterface.html">"Interfaces"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Java+Tutorials&amp;rft.atitle=Interfaces&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2FIandI%2Fcreateinterface.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-ibmuml-23"><span class="mw-cite-backlink">^ <a href="#cite_ref-ibmuml_23-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ibmuml_23-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBell" class="citation web cs1">Bell, Donald. <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/">"UML Basics: The class diagram"</a>. <i>developer Works</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=developer+Works&amp;rft.atitle=UML+Basics%3A+The+class+diagram&amp;rft.aulast=Bell&amp;rft.aufirst=Donald&amp;rft_id=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Frational%2Flibrary%2Fcontent%2FRationalEdge%2Fsep04%2Fbell%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch1994179-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994179_24-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;179.</span> </li> <li id="cite_note-cpppoly-25"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpppoly_25-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpppoly_25-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/polymorphism/">"Polymorphism"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%2B%2B+Language+Tutorial&amp;rft.atitle=Polymorphism&amp;rft_id=http%3A%2F%2Fwww.cplusplus.com%2Fdoc%2Ftutorial%2Fpolymorphism%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html">"Abstract Methods and Classes"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Java+Tutorials&amp;rft.atitle=Abstract+Methods+and+Classes&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2FIandI%2Fabstract.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://php.net/manual/en/language.oop5.abstract.php">"Class Abstraction"</a>. <i>PHP Manual</i>. The PHP Group<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=PHP+Manual&amp;rft.atitle=Class+Abstraction&amp;rft_id=http%3A%2F%2Fphp.net%2Fmanual%2Fen%2Flanguage.oop5.abstract.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms173156.aspx">"Interfaces (C# Programming Guide)"</a>. <i>C# Programming Guide</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-08-15</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%23+Programming+Guide&amp;rft.atitle=Interfaces+%28C%23+Programming+Guide%29&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms173156.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">"Inheritance (C# Programming Guide)"</a>. <i>C# Programming Guide</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%23+Programming+Guide&amp;rft.atitle=Inheritance+%28C%23+Programming+Guide%29&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms173149.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr061.htm">"Nested classes (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=XL+C%2FC%2B%2B+V8.0+for+AIX&amp;rft.atitle=Nested+classes+%28C%2B%2B+only%29&amp;rft_id=http%3A%2F%2Fpublib.boulder.ibm.com%2Finfocenter%2Fcomphelp%2Fv8v101%2Findex.jsp%3Ftopic%3D%252Fcom.ibm.xlcpp8a.doc%252Flanguage%252Fref%252Fcplr061.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr063.htm">"Local type names (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=XL+C%2FC%2B%2B+V8.0+for+AIX&amp;rft.atitle=Local+type+names+%28C%2B%2B+only%29&amp;rft_id=http%3A%2F%2Fpublib.boulder.ibm.com%2Finfocenter%2Fcomphelp%2Fv8v101%2Findex.jsp%3Ftopic%3D%252Fcom.ibm.xlcpp8a.doc%252Flanguage%252Fref%252Fcplr063.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr062.htm">"Local classes (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=XL+C%2FC%2B%2B+V8.0+for+AIX&amp;rft.atitle=Local+classes+%28C%2B%2B+only%29&amp;rft_id=http%3A%2F%2Fpublib.boulder.ibm.com%2Finfocenter%2Fcomphelp%2Fv8v101%2Findex.jsp%3Ftopic%3D%252Fcom.ibm.xlcpp8a.doc%252Flanguage%252Fref%252Fcplr062.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch1994133-134-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994133-134_33-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;133-134.</span> </li> <li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210224193450/http://pharo.gforge.inria.fr/PBE1/PBE1ch14.html">"13 Classes and metaclasses"</a>. <i>pharo.gforge.inria.fr</i>. Archived from <a rel="nofollow" class="external text" href="http://pharo.gforge.inria.fr/PBE1/PBE1ch14.html">the original</a> on 2021-02-24<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-10-31</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=pharo.gforge.inria.fr&amp;rft.atitle=13+Classes+and+metaclasses&amp;rft_id=http%3A%2F%2Fpharo.gforge.inria.fr%2FPBE1%2FPBE1ch14.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFThomasHunt" class="citation web cs1">Thomas; Hunt. <a rel="nofollow" class="external text" href="http://www.ruby-doc.org/docs/ProgrammingRuby/html/classes.html">"Classes and Objects"</a>. <i>Programming Ruby: The Pragmatic Programmer's Guide</i>. Ruby-Doc.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Programming+Ruby%3A+The+Pragmatic+Programmer%27s+Guide&amp;rft.atitle=Classes+and+Objects&amp;rft.au=Thomas&amp;rft.au=Hunt&amp;rft_id=http%3A%2F%2Fwww.ruby-doc.org%2Fdocs%2FProgrammingRuby%2Fhtml%2Fclasses.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTEBooch1994134-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994134_36-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&#160;134.</span> </li> <li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20101115095930/http://www.alu.org/mop/concepts.html#introduction">"MOP: Concepts"</a>. <i>The Common Lisp Object System MetaObject Protocol</i>. Association of Lisp Users. Archived from <a rel="nofollow" class="external text" href="https://www.alu.org/mop/concepts.html#introduction">the original</a> on 2010-11-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Common+Lisp+Object+System+MetaObject+Protocol&amp;rft.atitle=MOP%3A+Concepts&amp;rft_id=http%3A%2F%2Fwww.alu.org%2Fmop%2Fconcepts.html%23introduction&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">"sealed (C# Reference)"</a>. <i>C# Reference</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%23+Reference&amp;rft.atitle=sealed+%28C%23+Reference%29&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms173149.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/IandI/final.html">"Writing Final Classes and Methods"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Java+Tutorials&amp;rft.atitle=Writing+Final+Classes+and+Methods&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2FIandI%2Ffinal.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://php.net/manual/en/language.oop5.final.php">"PHP: Final Keyword"</a>. <i>PHP Manual</i>. The PHP Group<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-08-21</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=PHP+Manual&amp;rft.atitle=PHP%3A+Final+Keyword&amp;rft_id=http%3A%2F%2Fphp.net%2Fmanual%2Fen%2Flanguage.oop5.final.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html">"String (Java Platform SE 7)"</a>. <i>Java Platform, Standard Edition 7: API Specification</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Java+Platform%2C+Standard+Edition+7%3A+API+Specification&amp;rft.atitle=String+%28Java+Platform+SE+7%29&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2F7%2Fdocs%2Fapi%2Fjava%2Flang%2FString.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBrand2020" class="citation web cs1">Brand, Sy (2 March 2020). <a rel="nofollow" class="external text" href="https://devblogs.microsoft.com/cppblog/the-performance-benefits-of-final-classes/">"The Performance Benefits of Final Classes"</a>. <i>Microsoft C++ team blog</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">4 April</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Microsoft+C%2B%2B+team+blog&amp;rft.atitle=The+Performance+Benefits+of+Final+Classes&amp;rft.date=2020-03-02&amp;rft.aulast=Brand&amp;rft.aufirst=Sy&amp;rft_id=https%3A%2F%2Fdevblogs.microsoft.com%2Fcppblog%2Fthe-performance-benefits-of-final-classes%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/3.3/tutorial/classes.html">"9. Classes"</a>. <i>The Python Tutorial</i>. Python.org<span class="reference-accessdate">. Retrieved <span class="nowrap">3 March</span> 2018</span>. <q>As is true for modules, classes partake of the dynamic nature of Python: they are created at runtime, and can be modified further after creation.</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Python+Tutorial&amp;rft.atitle=9.+Classes&amp;rft_id=https%3A%2F%2Fdocs.python.org%2F3.3%2Ftutorial%2Fclasses.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-mspartial-44"><span class="mw-cite-backlink">^ <a href="#cite_ref-mspartial_44-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-mspartial_44-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFmairawBillWagnertompratt-AQ2015" class="citation cs2">mairaw; BillWagner; tompratt-AQ (2015-09-19), <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods">"Partial Classes and Methods"</a>, <i>C# Programming Guide</i>, Microsoft<span class="reference-accessdate">, retrieved <span class="nowrap">2018-08-08</span></span></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=C%23+Programming+Guide&amp;rft.atitle=Partial+Classes+and+Methods&amp;rft.date=2015-09-19&amp;rft.au=mairaw&amp;rft.au=BillWagner&amp;rft.au=tompratt-AQ&amp;rft_id=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fdotnet%2Fcsharp%2Fprogramming-guide%2Fclasses-and-structs%2Fpartial-classes-and-methods&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/79b3xss3(v=vs.100).aspx">"Static Classes and Static Class Members (C# Programming Guide)"</a>. <i>C# Programming Guide</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=C%23+Programming+Guide&amp;rft.atitle=Static+Classes+and+Static+Class+Members+%28C%23+Programming+Guide%29&amp;rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2F79b3xss3%28v%3Dvs.100%29.aspx&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html">"Anonymous Classes (The Java Tutorials &gt; Learning the Java Language &gt; Classes and Objects)"</a>. <i>docs.oracle.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-05-13</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.oracle.com&amp;rft.atitle=Anonymous+Classes+%28The+Java+Tutorials+%3E+Learning+the+Java+Language+%3E+Classes+and+Objects%29&amp;rft_id=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2FjavaOO%2Fanonymousclasses.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.php.net/manual/en/language.oop5.anonymous.php">"PHP: Anonymous classes - Manual"</a>. <i>www.php.net</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-08-11</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=www.php.net&amp;rft.atitle=PHP%3A+Anonymous+classes+-+Manual&amp;rft_id=https%3A%2F%2Fwww.php.net%2Fmanual%2Fen%2Flanguage.oop5.anonymous.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/concepts/object.html">"What is an Object?"</a>. <i>oracle.com</i>. Oracle Corporation<span class="reference-accessdate">. Retrieved <span class="nowrap">13 December</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=oracle.com&amp;rft.atitle=What+is+an+Object%3F&amp;rft_id=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2Ftutorial%2Fjava%2Fconcepts%2Fobject.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-49">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBoochRobert_A._MaksimchukMichael_W._EngleBobbi_J._Young_Ph.D.2007" class="citation book cs1">Booch, Grady; Robert A. Maksimchuk; Michael W. Engle; Bobbi J. Young Ph.D.; Jim Conallen; Kelli A. Houston (April 30, 2007). <a rel="nofollow" class="external text" href="http://my.safaribooksonline.com/book/software-engineering-and-development/object/9780201895513"><i>Object-Oriented Analysis and Design with Applications</i></a>. Addison-Wesley Professional. pp.&#160;1–28. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-201-89551-3" title="Special:BookSources/978-0-201-89551-3"><bdi>978-0-201-89551-3</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 December</span> 2013</span>. <q>There are fundamental limiting factors of human cognition; we can address these constraints through the use of decomposition, abstraction, and hierarchy.</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Object-Oriented+Analysis+and+Design+with+Applications&amp;rft.pages=1-28&amp;rft.pub=Addison-Wesley+Professional&amp;rft.date=2007-04-30&amp;rft.isbn=978-0-201-89551-3&amp;rft.aulast=Booch&amp;rft.aufirst=Grady&amp;rft.au=Robert+A.+Maksimchuk&amp;rft.au=Michael+W.+Engle&amp;rft.au=Bobbi+J.+Young+Ph.D.&amp;rft.au=Jim+Conallen&amp;rft.au=Kelli+A.+Houston&amp;rft_id=http%3A%2F%2Fmy.safaribooksonline.com%2Fbook%2Fsoftware-engineering-and-development%2Fobject%2F9780201895513&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-50">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJacobsenMagnus_ChristersonPatrik_JonssonGunnar_Overgaard1992" class="citation book cs1">Jacobsen, Ivar; Magnus Christerson; Patrik Jonsson; Gunnar Overgaard (1992). <a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco"><i>Object Oriented Software Engineering</i></a>. Addison-Wesley ACM Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-54435-0" title="Special:BookSources/0-201-54435-0"><bdi>0-201-54435-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Object+Oriented+Software+Engineering&amp;rft.pub=Addison-Wesley+ACM+Press&amp;rft.date=1992&amp;rft.isbn=0-201-54435-0&amp;rft.aulast=Jacobsen&amp;rft.aufirst=Ivar&amp;rft.au=Magnus+Christerson&amp;rft.au=Patrik+Jonsson&amp;rft.au=Gunnar+Overgaard&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fobjectorientedso00jaco&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-51">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4713.pdf">"C++ International standard"</a> <span class="cs1-format">(PDF)</span>. <i>Working Draft, Standard for Programming Language C++</i>. ISO/IEC JTC1/SC22 WG21. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171209100334/http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2017/n4713.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2017-12-09<span class="reference-accessdate">. Retrieved <span class="nowrap">5 January</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Working+Draft%2C+Standard+for+Programming+Language+C%2B%2B&amp;rft.atitle=C%2B%2B+International+standard&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fn4713.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-52"><span class="mw-cite-backlink"><b><a href="#cite_ref-52">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAmir2023" class="citation web cs1">Amir, Masroor (25 March 2023). <a rel="nofollow" class="external text" href="https://www.thegeeksbot.com/2023/03/object-oriented-programming.html">"OOP - Object Oriented Programming - Concepts | Languages | Benefits &#91;2023&#93;"</a>. <i>The Geeks Bot | A Computer Science Site for geeks</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-04-04</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=The+Geeks+Bot+%7C+A+Computer+Science+Site+for+geeks&amp;rft.atitle=OOP+-+Object+Oriented+Programming+-+Concepts+%7C+Languages+%7C+Benefits+%5B2023%5D&amp;rft.date=2023-03-25&amp;rft.aulast=Amir&amp;rft.aufirst=Masroor&amp;rft_id=https%3A%2F%2Fwww.thegeeksbot.com%2F2023%2F03%2Fobject-oriented-programming.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=28" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239549316">.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}</style><div class="refbegin" style=""> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBooch1994" class="citation book cs1">Booch, Grady (1994). <i>Objects and Design with Applications, Second Edition</i>. Benjamin/Cummings.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Objects+and+Design+with+Applications%2C+Second+Edition&amp;rft.pub=Benjamin%2FCummings&amp;rft.date=1994&amp;rft.aulast=Booch&amp;rft.aufirst=Grady&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGammaHelmJohnsonVlissides1995" class="citation book cs1">Gamma; Helm; Johnson; Vlissides (1995). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/designpatternsel00gamm"><i>Design Patterns: Elements of Reusable Object-Oriented Software</i></a></span>. Addison Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9780201633610" title="Special:BookSources/9780201633610"><bdi>9780201633610</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Design+Patterns%3A+Elements+of+Reusable+Object-Oriented+Software&amp;rft.pub=Addison+Wesley&amp;rft.date=1995&amp;rft.isbn=9780201633610&amp;rft.au=Gamma&amp;rft.au=Helm&amp;rft.au=Johnson&amp;rft.au=Vlissides&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fdesignpatternsel00gamm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBruce2002" class="citation book cs1">Bruce, Kim B. (2002). <a rel="nofollow" class="external text" href="http://mitpress.mit.edu/books/foundations-object-oriented-languages"><i>Foundations of Object-Oriented Languages: Types and Semantics</i></a>. Cambridge, Massachusetts: MIT Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-262-02523-2" title="Special:BookSources/978-0-262-02523-2"><bdi>978-0-262-02523-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Foundations+of+Object-Oriented+Languages%3A+Types+and+Semantics&amp;rft.place=Cambridge%2C+Massachusetts&amp;rft.pub=MIT+Press&amp;rft.date=2002&amp;rft.isbn=978-0-262-02523-2&amp;rft.aulast=Bruce&amp;rft.aufirst=Kim+B.&amp;rft_id=http%3A%2F%2Fmitpress.mit.edu%2Fbooks%2Ffoundations-object-oriented-languages&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AClass+%28computer+programming%29" class="Z3988"></span></li></ul> </div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Class_(computer_programming)&amp;action=edit&amp;section=29" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="http://lucacardelli.name/TheoryOfObjects.html">Abadi; Cardelli: A Theory of Objects</a></li> <li><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/">ISO/IEC 14882:2003 Programming Language C++, International standard</a></li> <li><a rel="nofollow" class="external text" href="http://www.laputan.org/reflection/warfare.html">Class Warfare: Classes vs. Prototypes</a>, by Brian Foote</li> <li>Meyer, B.: "Object-oriented software construction", 2nd edition, Prentice Hall, 1997, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-13-629155-4" title="Special:BookSources/0-13-629155-4">0-13-629155-4</a></li> <li>Rumbaugh et al.: "Object-oriented modeling and design", Prentice Hall, 1991, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-13-630054-5" title="Special:BookSources/0-13-630054-5">0-13-630054-5</a></li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Types_of_programming_languages" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Types_of_programming_languages" title="Template:Types of programming languages"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Types_of_programming_languages" title="Template talk:Types of programming languages"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Types_of_programming_languages" title="Special:EditPage/Template:Types of programming languages"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Types_of_programming_languages" style="font-size:114%;margin:0 4em"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Types of programming languages</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Level</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Machine_code" title="Machine code">Machine</a></li> <li><a href="/wiki/Assembly_language" title="Assembly language">Assembly</a></li> <li><a href="/wiki/Compiled_language" title="Compiled language">Compiled</a></li> <li><a href="/wiki/Interpreted_language" class="mw-redirect" title="Interpreted language">Interpreted</a></li></ul> <ul><li><a href="/wiki/Low-level_programming_language" title="Low-level programming language">Low-level</a></li> <li><a href="/wiki/High-level_programming_language" title="High-level programming language">High-level</a></li> <li><a href="/wiki/Very_high-level_programming_language" title="Very high-level programming language">Very high-level</a></li> <li><a href="/wiki/Esoteric_programming_language" title="Esoteric programming language">Esoteric</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Programming_language_generations" title="Programming language generations">Generation</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/First-generation_programming_language" title="First-generation programming language">First</a></li> <li><a href="/wiki/Second-generation_programming_language" title="Second-generation programming language">Second</a></li> <li><a href="/wiki/Third-generation_programming_language" title="Third-generation programming language">Third</a></li> <li><a href="/wiki/Fourth-generation_programming_language" title="Fourth-generation programming language">Fourth</a></li> <li><a href="/wiki/Fifth-generation_programming_language" title="Fifth-generation programming language">Fifth</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div><div role="navigation" class="navbox" aria-labelledby="Data_types" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Data_types" title="Template:Data types"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Data_types" title="Template talk:Data types"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Data_types" title="Special:EditPage/Template:Data types"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Data_types" style="font-size:114%;margin:0 4em"><a href="/wiki/Data_type" title="Data type">Data types</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Units_of_information" title="Units of information">Uninterpreted</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bit" title="Bit">Bit</a></li> <li><a href="/wiki/Byte" title="Byte">Byte</a></li> <li><a href="/wiki/Ternary_numeral_system" title="Ternary numeral system">Trit</a></li> <li><a href="/wiki/Ternary_numeral_system#Tryte" title="Ternary numeral system">Tryte</a></li> <li><a href="/wiki/Word_(computer_architecture)" title="Word (computer architecture)">Word</a></li> <li><a href="/wiki/Bit_array" title="Bit array">Bit array</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Numeric</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">Arbitrary-precision or bignum</a></li> <li><a href="/wiki/Complex_data_type" title="Complex data type">Complex</a></li> <li><a href="/wiki/Decimal_data_type" title="Decimal data type">Decimal</a></li> <li><a href="/wiki/Fixed-point_arithmetic" title="Fixed-point arithmetic">Fixed point</a></li> <li><a href="/wiki/Floating-point_arithmetic" title="Floating-point arithmetic">Floating point</a> <ul><li>Reduced precision <ul><li><a href="/wiki/Minifloat" title="Minifloat">Minifloat</a></li> <li><a href="/wiki/Half-precision_floating-point_format" title="Half-precision floating-point format">Half precision</a></li> <li><a href="/wiki/Bfloat16_floating-point_format" title="Bfloat16 floating-point format">bfloat16</a></li></ul></li> <li><a href="/wiki/Single-precision_floating-point_format" title="Single-precision floating-point format">Single precision</a></li> <li><a href="/wiki/Double-precision_floating-point_format" title="Double-precision floating-point format">Double precision</a></li> <li><a href="/wiki/Quadruple-precision_floating-point_format" title="Quadruple-precision floating-point format">Quadruple precision</a></li> <li><a href="/wiki/Octuple-precision_floating-point_format" title="Octuple-precision floating-point format">Octuple precision</a></li> <li><a href="/wiki/Extended_precision" title="Extended precision">Extended precision</a> <ul><li><a href="/wiki/Long_double" title="Long double">Long double</a></li></ul></li></ul></li> <li><a href="/wiki/Integer_(computer_science)" title="Integer (computer science)">Integer</a> <ul><li><a href="/wiki/Signedness" title="Signedness">signedness</a></li></ul></li> <li><a href="/wiki/Interval_arithmetic#Implementations" title="Interval arithmetic">Interval</a></li> <li><a href="/wiki/Rational_data_type" title="Rational data type">Rational</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">Pointer</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Memory_address" title="Memory address">Address</a> <ul><li><a href="/wiki/Physical_address" title="Physical address">physical</a></li> <li><a href="/wiki/Virtual_address_space" title="Virtual address space">virtual</a></li></ul></li> <li><a href="/wiki/Reference_(computer_science)" title="Reference (computer science)">Reference</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Plain_text" title="Plain text">Text</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Character_(computing)" title="Character (computing)">Character</a></li> <li><a href="/wiki/String_(computer_science)" title="String (computer science)">String</a> <ul><li><a href="/wiki/Null-terminated_string" title="Null-terminated string">null-terminated</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Composite_data_type" title="Composite data type">Composite</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Algebraic_data_type" title="Algebraic data type">Algebraic data type</a> <ul><li><a href="/wiki/Generalized_algebraic_data_type" title="Generalized algebraic data type">generalized</a></li></ul></li> <li><a href="/wiki/Array_data_type" class="mw-redirect" title="Array data type">Array</a></li> <li><a href="/wiki/Associative_array" title="Associative array">Associative array</a></li> <li><a class="mw-selflink selflink">Class</a></li> <li><a href="/wiki/Dependent_type" title="Dependent type">Dependent</a></li> <li><a href="/wiki/Intuitionistic_type_theory#Equality_type" title="Intuitionistic type theory">Equality</a></li> <li><a href="/wiki/Inductive_type" title="Inductive type">Inductive</a></li> <li><a href="/wiki/Intersection_type" title="Intersection type">Intersection</a></li> <li><a href="/wiki/List_(abstract_data_type)" title="List (abstract data type)">List</a></li> <li><a href="/wiki/Object_(computer_science)" title="Object (computer science)">Object</a> <ul><li><a href="/wiki/Metaobject" title="Metaobject">metaobject</a></li></ul></li> <li><a href="/wiki/Option_type" title="Option type">Option type</a></li> <li><a href="/wiki/Product_type" title="Product type">Product</a></li> <li><a href="/wiki/Record_(computer_science)" title="Record (computer science)">Record or Struct</a></li> <li><a href="/wiki/Refinement_type" title="Refinement type">Refinement</a></li> <li><a href="/wiki/Set_(abstract_data_type)" title="Set (abstract data type)">Set</a></li> <li><a href="/wiki/Union_type" title="Union type">Union</a> <ul><li><a href="/wiki/Tagged_union" title="Tagged union">tagged</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Boolean_data_type" title="Boolean data type">Boolean</a></li> <li><a href="/wiki/Bottom_type" title="Bottom type">Bottom type</a></li> <li><a href="/wiki/Container_(abstract_data_type)" title="Container (abstract data type)">Collection</a></li> <li><a href="/wiki/Enumerated_type" title="Enumerated type">Enumerated type</a></li> <li><a href="/wiki/Exception_handling" title="Exception handling">Exception</a></li> <li><a href="/wiki/Function_type" title="Function type">Function type</a></li> <li><a href="/wiki/Opaque_data_type" title="Opaque data type">Opaque data type</a></li> <li><a href="/wiki/Recursive_data_type" title="Recursive data type">Recursive data type</a></li> <li><a href="/wiki/Semaphore_(programming)" title="Semaphore (programming)">Semaphore</a></li> <li><a href="/wiki/Stream_(computing)" title="Stream (computing)">Stream</a></li> <li><a href="/wiki/Strongly_typed_identifier" title="Strongly typed identifier">Strongly typed identifier</a></li> <li><a href="/wiki/Top_type" title="Top type">Top type</a></li> <li><a href="/wiki/Type_class" title="Type class">Type class</a></li> <li><a href="/wiki/Empty_type" title="Empty type">Empty type</a></li> <li><a href="/wiki/Unit_type" title="Unit type">Unit type</a></li> <li><a href="/wiki/Void_type" title="Void type">Void</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related<br />topics</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Abstract_data_type" title="Abstract data type">Abstract data type</a></li> <li><a href="/wiki/Boxing_(computer_science)" class="mw-redirect" title="Boxing (computer science)">Boxing</a></li> <li><a href="/wiki/Data_structure" title="Data structure">Data structure</a></li> <li><a href="/wiki/Generic_programming" title="Generic programming">Generic</a></li> <li><a href="/wiki/Kind_(type_theory)" title="Kind (type theory)">Kind</a> <ul><li><a href="/wiki/Metaclass" title="Metaclass">metaclass</a></li></ul></li> <li><a href="/wiki/Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></li> <li><a href="/wiki/Primitive_data_type" title="Primitive data type">Primitive data type</a></li> <li><a href="/wiki/Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface</a></li> <li><a href="/wiki/Subtyping" title="Subtyping">Subtyping</a></li> <li><a href="/wiki/Type_constructor" title="Type constructor">Type constructor</a></li> <li><a href="/wiki/Type_conversion" title="Type conversion">Type conversion</a></li> <li><a href="/wiki/Type_system" title="Type system">Type system</a></li> <li><a href="/wiki/Type_theory" title="Type theory">Type theory</a></li> <li><a href="/wiki/Variable_(computer_science)" title="Variable (computer science)">Variable</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐6b7f745dd4‐g8pqx Cached time: 20241125143355 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.158 seconds Real time usage: 1.354 seconds Preprocessor visited node count: 5568/1000000 Post‐expand include size: 126372/2097152 bytes Template argument size: 4213/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 22/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 189489/5000000 bytes Lua time usage: 0.742/10.000 seconds Lua memory usage: 16748424/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1231.753 1 -total 33.69% 414.929 2 Template:Reflist 25.44% 313.392 36 Template:Cite_web 14.25% 175.488 5 Template:Annotated_link 8.30% 102.220 2 Template:Navbox 7.94% 97.823 1 Template:Types_of_programming_languages 7.59% 93.497 11 Template:Sfn 6.32% 77.872 1 Template:Short_description 4.68% 57.591 1 Template:Citation_needed 4.64% 57.109 2 Template:Ambox --> <!-- Saved in parser cache with key enwiki:pcache:idhash:7392-0!canonical and timestamp 20241125143355 and revision id 1255112799. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Class_(computer_programming)&amp;oldid=1255112799">https://en.wikipedia.org/w/index.php?title=Class_(computer_programming)&amp;oldid=1255112799</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Class_(computer_programming)" title="Category:Class (computer programming)">Class (computer programming)</a></li><li><a href="/wiki/Category:Programming_constructs" title="Category:Programming constructs">Programming constructs</a></li><li><a href="/wiki/Category:Programming_language_topics" title="Category:Programming language topics">Programming language topics</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_April_2012" title="Category:Articles with unsourced statements from April 2012">Articles with unsourced statements from April 2012</a></li><li><a href="/wiki/Category:Articles_with_example_Java_code" title="Category:Articles with example Java code">Articles with example Java code</a></li><li><a href="/wiki/Category:Articles_needing_additional_references_from_April_2012" title="Category:Articles needing additional references from April 2012">Articles needing additional references from April 2012</a></li><li><a href="/wiki/Category:All_articles_needing_additional_references" title="Category:All articles needing additional references">All articles needing additional references</a></li><li><a href="/wiki/Category:Articles_needing_additional_references_from_May_2024" title="Category:Articles needing additional references from May 2024">Articles needing additional references from May 2024</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 3 November 2024, at 05:54<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Class_(computer_programming)&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-694cf4987f-lrw9j","wgBackendResponseTime":154,"wgPageParseReport":{"limitreport":{"cputime":"1.158","walltime":"1.354","ppvisitednodes":{"value":5568,"limit":1000000},"postexpandincludesize":{"value":126372,"limit":2097152},"templateargumentsize":{"value":4213,"limit":2097152},"expansiondepth":{"value":14,"limit":100},"expensivefunctioncount":{"value":22,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":189489,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 1231.753 1 -total"," 33.69% 414.929 2 Template:Reflist"," 25.44% 313.392 36 Template:Cite_web"," 14.25% 175.488 5 Template:Annotated_link"," 8.30% 102.220 2 Template:Navbox"," 7.94% 97.823 1 Template:Types_of_programming_languages"," 7.59% 93.497 11 Template:Sfn"," 6.32% 77.872 1 Template:Short_description"," 4.68% 57.591 1 Template:Citation_needed"," 4.64% 57.109 2 Template:Ambox"]},"scribunto":{"limitreport-timeusage":{"value":"0.742","limit":"10.000"},"limitreport-memusage":{"value":16748424,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFAmir2023\"] = 1,\n [\"CITEREFBell\"] = 1,\n [\"CITEREFBen-Ari2007\"] = 1,\n [\"CITEREFBerfeld2008\"] = 1,\n [\"CITEREFBooch1994\"] = 1,\n [\"CITEREFBoochRobert_A._MaksimchukMichael_W._EngleBobbi_J._Young_Ph.D.2007\"] = 1,\n [\"CITEREFBrand2020\"] = 1,\n [\"CITEREFBruce2002\"] = 1,\n [\"CITEREFGammaHelmJohnsonVlissides1995\"] = 1,\n [\"CITEREFJacobsenMagnus_ChristersonPatrik_JonssonGunnar_Overgaard1992\"] = 2,\n [\"CITEREFKnublauchOberleTetlowWallace2006\"] = 1,\n [\"CITEREFParsons2015\"] = 1,\n [\"CITEREFThomasHunt\"] = 2,\n [\"CITEREFWild\"] = 1,\n [\"CITEREFmairawBillWagnertompratt-AQ2015\"] = 1,\n}\ntemplate_list = table#1 {\n [\"!\"] = 3,\n [\"Annotated link\"] = 5,\n [\"Citation\"] = 1,\n [\"Citation needed\"] = 1,\n [\"Citations needed\"] = 1,\n [\"Cite book\"] = 7,\n [\"Cite web\"] = 36,\n [\"Code\"] = 2,\n [\"DEFAULTSORT:Class (Computer Programming)\"] = 1,\n [\"Data types\"] = 1,\n [\"Em\"] = 2,\n [\"Endash\"] = 2,\n [\"Further\"] = 2,\n [\"Google books\"] = 1,\n [\"ISBN\"] = 2,\n [\"Java\"] = 1,\n [\"Main\"] = 4,\n [\"Mdashb\"] = 2,\n [\"Mono\"] = 22,\n [\"Notelist\"] = 1,\n [\"Portal\"] = 1,\n [\"Redirect\"] = 1,\n [\"Refbegin\"] = 1,\n [\"Refend\"] = 1,\n [\"Reflist\"] = 1,\n [\"See also\"] = 1,\n [\"Sfn\"] = 11,\n [\"Short description\"] = 1,\n [\"Types of programming languages\"] = 1,\n [\"Unreferenced section\"] = 1,\n [\"Vanchor\"] = 1,\n}\narticle_whitelist = table#1 {\n}\n"},"cachereport":{"origin":"mw-web.codfw.main-6b7f745dd4-g8pqx","timestamp":"20241125143355","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Class (computer programming)","url":"https:\/\/en.wikipedia.org\/wiki\/Class_(computer_programming)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q4479242","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q4479242","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2001-12-09T00:04:05Z","dateModified":"2024-11-03T05:54:41Z","headline":"in object-oriented programming, a definition that specifies how an object works"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10