sehqlr / menne-lecture-java

Mike Menne's Java Class
0 stars 0 forks source link

Methods prefer private #5

Open mpmenne opened 10 years ago

mpmenne commented 10 years ago

Good job making lots of methods that do specific stuff.

Java is a little bit funny about scope. To increase encapsulation it tries to hide all implementation details by using the private keyword (both on methods and variables). This makes it easier to change in the future.

Sam sorry for all of Java stodgy rules. I know Python is much more free flowing, and Python can do that because it's awesome :-)

sehqlr commented 10 years ago

OK. When I push my changes, the only public methods will be the constructor and main. Right?