Weird. Why doesn’t this work? ``` public object Fo...
# getting-started
a
Weird. Why doesn’t this work?
Copy code
public object Foo {
    public val bar = "bar"
}
Copy code
//java 
String f = Foo.bar; // error: bar has private access in Foo
String f = Foo.INSTANCE.getBar(); // OK