Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

Re: Instance Method

$
0
0

Hi,

 

Instance methods are called using the instance of the class and you want to call the method in the interface i believe which is not possible since interface only contains the declaration part.

 

Class which implement the interface is responsible to provide implementation to the methods of an interface.

 

During the implementation of  interface methods you can directly call the instance method over there.

 


CLASS cls IMPLEMENTATION.

   METHOD m_tab.

       write:/ 'I am an instance method'.

   ENDMETHOD



   METHOD interface1~method. "
    write:/ 'I am an interface method'.
      CALLMETHOD m_tab.  <<<< instance method

   ENDMETHOD.                    "m_tab

ENDCLASS.                    "cls IMPLEMENTATION


 

 

thank you!!


Viewing all articles
Browse latest Browse all 3458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>