Extension function for Java class

If you could add a static function to a class it will be bonded to that class and it will not “pollute” the namespace at the package you are working. Probably, if a Companion object could be created automatically (as @darksnake mentioned) , this could be achieved.
I asked just to assure if this was not possible or if I have missed something!

1 Like