Need feedback
# announcements
r
Need feedback
k
Don't call your class
SERVICE
with all caps.
2
h
why
val service: SERVICE by lazy
is by lazy?
r
Ok @karelpeeters
To initialise on first time uses. @Hexa
k
If that's the only thing in your class the JVM will do something similar by itself, it only initializes classes when they're first used.
r
@karelpeeters i have declared my class API as singleton with object keyword. So when i call API.service it will only intialize that time only once.
k
Sure, we're saying you don't really need the
lazy
.
r
@karelpeeters ok. I will remove the lazy part