美文网首页
kotlin : the position of functio

kotlin : the position of functio

作者: toExploreFuture | 来源:发表于2018-11-15 16:31 被阅读0次
    • If the function A is written in a file, the IDE will hint you an error when you write another function with the same name and same param in the other file

    • I find the funciton written in a file can call anywhere directly with none prefix. It's said that this function is compiled to a static function belong to the applicaiton.

    • If you define a function one(value : Type) in class A ,and then you define a function one (value : Type) with the same fun name 、the same param count and the same param type in class B , It's no problem . The two function is not the same function,they all hava there's class name prefix:A.one(value:Type) B.one(value:Type)

    相关文章

      网友评论

          本文标题:kotlin : the position of functio

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