search

Home  >  Q&A  >  body text

What does: self/Test mean after the function?

public static function Test():slef
{
 //函数体
}

public static function Test():slef{ //Function body}

What does: self or: Test mean here?

拉拉韦尔拉拉韦尔1610 days ago1990

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2020-06-23 17:10:11

    Use a colon after the method name to declare the type of the return value. It should be self in the code

    reply
    0
  • Cancelreply