Java had an interesting approach: when giving a programmer a choice can only degrade the quality of programming, remove that choice.
They did it in several places. File names and packages for sure, but also not allowing multiple public classes in a file (never good), not allowing you to split classes between files (damn it, work with!), Etc.
I am very sorry that they did not go any further. There is no reason for public variables: I never needed it, and I never saw a situation where some clever programmer thought he needed it and was right.
I also would not want to see restrictions on the size of the method / class, but this could become sketchy (it could be easily implemented using code checks, usually the problem is that the companies that need the most help are those who do not know that they need help and therefore do not use tools such as code checks).
This is not important for most small teams, but when your team grows and has several sites with consultants from India, China and other other places around the world, you will begin to appreciate the inflexibility.
In response to the setter / getter message:
Java beans were an abomination created by Borland to crack their GUI, and then were translated into Java.
A terrible idea - distraction from OO programming - Getters and seters A) show too much of your implementation and B) make you think about manipulating the data of another object, rather than asking another object to perform an operation for you. Bad hacking for people who still can't think in OO.
Sometimes it is necessary that getters are necessary, but they cannot be added unless they are considered absolutely inevitable.
Seniors should be avoided at all costs. If you absolutely need an external state change after creating the object, try using the builder pattern and protect your setters from being called after any operation.
Obviously, there are exceptions in everything, and many "Getters" are actually critical object business logic, such as String.length (), which would be required no matter how String was implemented, and not even implemented just by returning the property - great case for "getter" if you even want to call it.