Java Programming: 4 - Methods

Published: 21 May 2011
on channel: CodeMonkeyCharlie
333,826
2.9k

I use the word function interchangeably with method in this video (out of habit--methods in Java are called functions in other languages).

This tutorial covers the basics of writing and calling methods. We show examples of methods that return a value, take arguments, and methods that simply do some task that requires neither a return value or arguments passed.

Why use additional methods when you can just put everything inside of main? Methods allow for abstraction, easy code reuse, and allow you to utilize scope.

I'm not completely satisfied with this tutorial, and may redo it in the future. Let me know if any parts are particularly confusing for you so that I can be clearer if do it again.


On this page of the site you can watch the video online Java Programming: 4 - Methods with a duration of hours minute second in good quality, which was uploaded by the user CodeMonkeyCharlie 21 May 2011, share the link with friends and acquaintances, this video has already been watched 333,826 times on youtube and it was liked by 2.9 thousand viewers. Enjoy your viewing!