美文网首页
Difference between a method and

Difference between a method and

作者: 清水芦苇 | 来源:发表于2017-08-22 07:39 被阅读2次

缘起

jsx教程看到这样一句话

Here is hello.jsx, the source code of the "Hello world!" example. You can see several features of JSX in this program, namely, static types and class structure within the source code.

class _Main {
    static function main(args : string[]) : void {
        log "Hello, world!";
    }
}

Class _Main has a static member function (a.k.a. a class method) named main, that takes an array of strings and returns nothing.

那么method和function在计算机领域到底有什么不同呢?

参考资料

https://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function

相关文章

网友评论

      本文标题:Difference between a method and

      本文链接:https://www.haomeiwen.com/subject/gvskdxtx.html