the joy is in the surprise and struggle -- same brain wake-up techniques in Head First Java book(s) -- which was original Java Ranch. Very clever and smart people at Code Gym. Trust the process .
Kinda foggy on this still --- the Method has the same name as the Class --- ie Cat. The class method is mounting up some properties to give it a shape. Not an instance. If you create an object -- each has its own name field. -- from thomas (Germany) >> The scope of the field is the entire class, or better, you can access this field in all methods. If you access a field in a method, you can prefix it with this fieldName. That way you see at once, that it's a field and it won't give problems, if you have parameters with the same name e.g. in the constructor. Is not a variable -- but a field or attribute of the class Cat.
I think that is the way of code gym to learn and repeat. Sometimes I was confuse and some topics are over leveled. But in that way (like this lesson) I'm not worries that I misunderstand some key topics of Java. Let's see what happen next...
Seems like the lessons are kinda backwards. I'm using codegym as a refresher and I was using techniques in the syntax lessons that we are now supposedly learning. Not sure how anyone who just started Java would be able to solve some of the earlier problems
GO TO FULL VERSION