<?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: constructor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081735#M975964</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;You can see this three examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Defining Components|https://wiki.sdn.sap.com/wiki/x/OKg] - Its demonstrates how to define and implement Methods. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Using Instance Constructor|https://wiki.sdn.sap.com/wiki/x/0dg] - Its demonstrates how to define and implement Instance Constructor.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Using Static Constructor|https://wiki.sdn.sap.com/wiki/x/ZtM] - Its demonstrates how to define and implement Static Constructor.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can Cope &amp;amp; Past this examples and run in your own &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this examples and all other users of explanations be useful for you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2008 15:10:49 GMT</pubDate>
    <dc:creator>marcelo_ramos1</dc:creator>
    <dc:date>2008-07-03T15:10:49Z</dc:date>
    <item>
      <title>constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081728#M975957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;can any body tell me exactly &lt;/P&gt;&lt;P&gt; what is the difference between CONSTRUCTOR &amp;amp; METHOD of a class.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be awarded&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081728#M975957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T09:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081729#M975958</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;PRE&gt;&lt;CODE&gt;The constructor method is called automatically when you instantiate the class ( create object statement).
 You generally pass the parameters of the method in the create object statement.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is also a method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the difference is that it is called automatically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While the normal method is called when u explicitly call that method by class name or object name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Brijesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081729#M975958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T09:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081730#M975959</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;  You can refer to the following SAP Dcoument for more clarity&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/erp2005_ehp_03/helpdata/EN/08/d27c03b81011d194f60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/erp2005_ehp_03/helpdata/EN/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081730#M975959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T09:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081731#M975960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls Go Through the Documentation In The Below Link ,you&lt;/P&gt;&lt;P&gt;will understand -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://saphelp.border-states.com/EN/c3/225b5c54f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://saphelp.border-states.com/EN/c3/225b5c54f411d194a60000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope It will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081731#M975960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T09:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081732#M975961</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;CONSTRUCTOR is a method that is automatically called during object creation. Even when you do not define a CONSTRUCTOR in the class, their exists one called the default constructor. The constructor always has a returning parameter and it returns the object reference. Constructor is more like malloc in C where the memory is allocated to the object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method is the bheaviour of the object/class. It needs to be implicitly called. Methods can have returning/exporting parameters. Methods do not allocate memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clarifies your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081732#M975961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T09:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081733#M975962</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;&lt;STRONG&gt;CONSTRUCTOR:&lt;/STRONG&gt;  It is a special method which is called &lt;/P&gt;&lt;P&gt;automatically by the runtime system (depends on the type)&lt;/P&gt;&lt;P&gt;when a new object is created OR the class is called for the first time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;METHOD:&lt;/STRONG&gt;  It describes the behaviour of an object. It contains &lt;/P&gt;&lt;P&gt;the functionality which an object can perform. It should be &lt;/P&gt;&lt;P&gt;called explicitly in the calling program unless it is a &lt;/P&gt;&lt;P&gt;CONSTRUCTOR OR CLASS_CONSTRUCTOR method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 09:56:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081733#M975962</guid>
      <dc:creator>former_member787646</dc:creator>
      <dc:date>2008-07-03T09:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081734#M975963</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;Method -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Methods are the internal procedures of a class . &lt;/P&gt;&lt;P&gt;Have a parameter interface, through which the system passes values to them when they are called, and through which they can return values to the caller. &lt;/P&gt;&lt;P&gt;Can access all the attributes of their class. &lt;/P&gt;&lt;P&gt;The private attributes of a class can only be changed using methods. &lt;/P&gt;&lt;P&gt;One can draw the analogy between methods and function modules in ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constructor -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructors are special PUBLIC methods that are triggered when an object is instantiated from a class. They are necessary when you want to set the initial state of an object dynamically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like normal methods, there are two types of constructor - instance constructors and static constructors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the instance constructor, the CONSTRUCTOR method must be declared in the public section of the class using the METHODS statement, and implemented in the implementation section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpfull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 11:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081734#M975963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T11:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081735#M975964</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;You can see this three examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Defining Components|https://wiki.sdn.sap.com/wiki/x/OKg] - Its demonstrates how to define and implement Methods. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Using Instance Constructor|https://wiki.sdn.sap.com/wiki/x/0dg] - Its demonstrates how to define and implement Instance Constructor.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;[ABAP Objects - Creating your First Local Class - Using Static Constructor|https://wiki.sdn.sap.com/wiki/x/ZtM] - Its demonstrates how to define and implement Static Constructor.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can Cope &amp;amp; Past this examples and run in your own &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this examples and all other users of explanations be useful for you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 15:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081735#M975964</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2008-07-03T15:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081736#M975965</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; Constructor is a special method of object which is used to initialize the attributes of object at the time of creation.Constructor cannot be called explicitly.Method is called explicitly which is used to perform an action to the object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 12:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081736#M975965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T12:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081737#M975966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiii!&lt;/P&gt;&lt;P&gt;Instance Constructor = The constructor is a special instance method in a class and is always named CONSTRUCTOR.&lt;/P&gt;&lt;P&gt;The constructor is automatically called at runtime with CREATE OBJECT statement.&lt;/P&gt;&lt;P&gt;Some Important points about constructor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each class can have only one constructor. &lt;/P&gt;&lt;P&gt;The constructor must be defined in PUBLIC SECTION. &lt;/P&gt;&lt;P&gt;The constructor's signature can have only importing parameters and exceptions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When exceptions are raised in the constructor, instances are not created so no main memory is occupied. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static Constructor = This is a special static method in a class and is always names CLASS_CONSTRUCTOR. It is executed once per program. This constructor is called automatically before the class is first accessed, but before any of the following actions are executed for the first time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating instance of this class(CREATE OBJECT) &lt;/P&gt;&lt;P&gt;Accessing a static attribute of this class. &lt;/P&gt;&lt;P&gt;Calling a static method of this class. &lt;/P&gt;&lt;P&gt;Registering an event handler method for an event in this class. &lt;/P&gt;&lt;P&gt;Some important points:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each class has only one static constructor &lt;/P&gt;&lt;P&gt;This constructor must be defined in PUBLIC SECTION. &lt;/P&gt;&lt;P&gt;The constructor's signature cannot have importing parameters or exceptions. &lt;/P&gt;&lt;P&gt;The static constructor cannot be called explicitly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet Kulshreshtha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 06:49:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081737#M975966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T06:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081738#M975967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiii! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Methods are internal procedures in classes that determine the behaviour of the objects. they can access all attributes in their class and can therefore change the state of other elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Methods have a signature that enables them to receive values WHEN THEY ARE CALLED and pass values back to the calling program.Methods can have any number of importing, exporting and changing parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructors are basically a method which are called automatically at runtime with the CREATE OBJECT statement.&lt;/P&gt;&lt;P&gt;CONSTRUCTORS CAN ONLY BE DECLARED IN PUBLIC SECTION, WHILE METHODS CAN BE DECLARED BOTH IN PRIVATE AND PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check out this link, all your doubts regarding ABAP Objects will be cleared&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-press.de/katalog/buecher/htmlleseproben/gp/htmlprobID-28?GalileoSession=22448306A3l7UG82GU8#level3~3" target="test_blank"&gt;http://www.sap-press.de/katalog/buecher/htmlleseproben/gp/htmlprobID-28?GalileoSession=22448306A3l7UG82GU8#level3~3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Abhijeet Kulshreshtha on Jul 11, 2008 8:50 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 06:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081738#M975967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T06:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: constructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081739#M975968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Constructor:&lt;/STRONG&gt;  Constructor is related to object creation it will be called only when your &lt;STRONG&gt;create object&lt;/STRONG&gt;  statement executed .its use it to set the state of object ,because each object has its own copy of attribute like you have defined variable like data: roll. no. type  i, each object has its own copy of roll. no.&lt;/P&gt;&lt;P&gt;so threw constructor you can set object attribute value.its same like method but called by object only and once when a new object created. there is default constructor within every class.&lt;/P&gt;&lt;P&gt;it you do not write your constructor default constructor called .&lt;/P&gt;&lt;P&gt; you can call your  constructor threw object .     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method:&lt;/STRONG&gt; here u defined the functionality that your object want ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose you want add some value on this roll. no.or you want to write&lt;/P&gt;&lt;P&gt;some o/p you can just &lt;STRONG&gt;write:/&lt;/STRONG&gt; statement here.&lt;/P&gt;&lt;P&gt;it can be called many times on the same object or different .&lt;/P&gt;&lt;P&gt;but it can be called threw object. and there is no default method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 10:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor/m-p/4081739#M975968</guid>
      <dc:creator>former_member8532</dc:creator>
      <dc:date>2008-07-11T10:42:06Z</dc:date>
    </item>
  </channel>
</rss>

