<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Difference between Static &amp; Instance Attribute of a Class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913201#M379962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSTANCE variables:&lt;/P&gt;&lt;P&gt;Things that an object knows about itself are called instance variables.&lt;/P&gt;&lt;P&gt;They represent an object&amp;#146;s state( the data ), and can have unique values for each object of that type.&lt;/P&gt;&lt;P&gt;STATIC variables:&lt;/P&gt;&lt;P&gt;When a member is declared static, it can be accessed before any objects of is class are created, and without reference to any object. You can declare both methods and variables static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STATIC means they are common to all Instances of the Class, where as INSTANCE variables are pertains to a Particular object of that class.&lt;/P&gt;&lt;P&gt;All the Instances of the class share the STATIC varaibles but in case of  INSTANCE variables each object have its own copy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2007 09:27:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-14T09:27:49Z</dc:date>
    <item>
      <title>Difference between Static &amp; Instance Attribute of a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913200#M379961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I may ask what is the difference between static &amp;amp; instance of a class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: name       TYPE string,&lt;/P&gt;&lt;P&gt;           planetype TYPE saplane-planetype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS-DATA: n_o_airplanes TYPE i.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2007 09:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913200#M379961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-14T09:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Static &amp; Instance Attribute of a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913201#M379962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSTANCE variables:&lt;/P&gt;&lt;P&gt;Things that an object knows about itself are called instance variables.&lt;/P&gt;&lt;P&gt;They represent an object&amp;#146;s state( the data ), and can have unique values for each object of that type.&lt;/P&gt;&lt;P&gt;STATIC variables:&lt;/P&gt;&lt;P&gt;When a member is declared static, it can be accessed before any objects of is class are created, and without reference to any object. You can declare both methods and variables static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STATIC means they are common to all Instances of the Class, where as INSTANCE variables are pertains to a Particular object of that class.&lt;/P&gt;&lt;P&gt;All the Instances of the class share the STATIC varaibles but in case of  INSTANCE variables each object have its own copy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2007 09:27:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913201#M379962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-14T09:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Static &amp; Instance Attribute of a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913202#M379963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. normally instance concept is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. It means, that,&lt;/P&gt;&lt;P&gt;    the program has to create the object (of the type of that class),&lt;/P&gt;&lt;P&gt;   and only after creating that object in memory,&lt;/P&gt;&lt;P&gt;   it can access that paritcular attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Otherwise,&lt;/P&gt;&lt;P&gt;4. If it is static,&lt;/P&gt;&lt;P&gt;   then simply by using the classname (without creating the object in memory),&lt;/P&gt;&lt;P&gt;   we can use the attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2007 09:28:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-static-instance-attribute-of-a-class/m-p/1913202#M379963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-14T09:28:21Z</dc:date>
    </item>
  </channel>
</rss>

