also another (probably dumb) question. "Fields can...
# announcements
a
also another (probably dumb) question. "Fields cannot be declared directly in Kotlin classes." umm... they can? I am confused
image.png
d
That's a property, not a field.
It is backed by a field, but it also has a getter.
a
ah
s
Indeed. So with this code, you wouldn't be able to say
new SimpleCoreMain().test
from a Java file. At least not without
@JvmField
on the field/property.
You'd be required to call
getTest()
.