要使用相等於Java的static用法的話,你得在 object 關鍵字前加上 companion 關鍵字。以下面的代碼為例,加上 companion 後不管有沒有額外call Companion ,都可以直接 ...
確定! 回上一頁