There is nothing special with the name obj, it's just a name. The assignments in the method, fun1, creates a structure (named obj ) with two fields.
I assume that you tried a static method to make the one-liner, classname.fun1(arg,arg), possible.
classname_2 illustrates how to do it with an ordinary method. That requires two lines.
classname_3 illustrates a trick that makes the one-liner possible. However, DON'T USE IT. I'm convinced it will eventually cause trouble. I included it to show that the class instance, obj, must be created before it's used. If it isn't passed to the method, it can be created locally (it seems).