首页
Java
登录
6mi
u
盘
搜
搜 索
Java
Android kotlin静态属性、静态方法
Android kotlin静态属性、静态方法
xiaoxiao
2021-02-28
99
只需要用 companion object 包裹相应代码块即可。以静态属性为例:
class
Constants
{
companion
object
{
val
BASE_URL =
"http://192.168.x.x/decoration_axx_api/"
} }
调用
Constants
.Companion
.getBASE
_URL()
转载请注明原文地址: https://www.6miu.com/read-54160.html
技术
最新回复
(
0
)