Lesson

Codecademy Learn Java, Methods part 2, Object Oriented Java

Lesson Summary

In this Java lesson we go over method a bit further. We create a new method called run which takes in an int parameter variable called feet. When then call the run method on our spike object and pass in 10000 as the feet. When we run the program it runs the code within the run method which prints "Your dog ran 10000 feet!"

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: