Why String.split method requires a question mark when String is a var but doesn't require when split is a val

前端 未结 0 1802
时光取名叫无心
时光取名叫无心 2020-12-02 03:06

The Following Code:

    class SomeClass (val someStr : String?, context: Context?)
{
       fun someMethod()
       {
           someStr.split(anyDelimiter)           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题