Friday, July 31, 2009

Is static function of c++ same as static functio of java?

Yes. The only difference is that in C++ you need to call the function using Class::staticFunctionName(), while in Java you would call it as Class.staticFunctionName(). You must understand that a static function belongs to the whole class, and not individual objects.

Is static function of c++ same as static functio of java?
both are meant for same intention. means it is almost same


but slight difference in memmory allocation.like the mem allocation will be done at the load time itself in java.





i mean will be static for the whole application in java
Reply:No its different


No comments:

Post a Comment