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

Re: one question about method and static method

$
0
0

Hi Ming Yu,

For this case, we won't find any difference in static method and normal(Instance) method based on variable.

 

But basic difference in calling the method.

 

Static Method

To call static method, it is not required to create the object for the class. Also static method won't support polymorphism.

 

CLASS1=>METHOD1.

 

Instance Method

To call normal method(Instance), It is required to have the object for the class.

 

OBJ->METHOD1.

 

Regards

 

Rajkumar Narasimman


Viewing all articles
Browse latest Browse all 8538

Trending Articles



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