title: Why can attributes in Java be public?
body: <p>As everybody knows, Java follows the paradigms of object orientation, where data encapsulation says, that fields (attributes) of an object should be hidden for the outer world and only accessed via methods or that methods are the <em>only</em> interface of the class for the outer world. So why is it possible to declare a field in Java as public, which would be against the data encapsulation paradigm?</p>