Java Programming: 4 – Methods

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.


Sasha Farenyuk says:

great video, one of the best

Darshil Rathod says:

this really helped!! thanks man!!

David Brown says:

Lost me on this one.

future Programmer says:

nice video, but the main method should be below all other methods

Abhi Shek says:


Kemo Ireland says:

Thank you so much for uploading your Excellent and easy to follow tutorial ,looking forward to watch more of your Excellent teaching technics ” Teachers need to learn from this guy on how to teach “

Darren Murphy says:

Thank you very much this was a very informative tutorial good job man!

Joe T says:

Wow best tutorial ever. Spent two weeks on my Profs notes and TA’s office hours and this video worked better than all that! Thanks bro, you got a gift at making coding understandable!

GeishaTheSerpantClan says:

Please come to sweden and replace my teacher.

Elleni G says:

These explanations are so clear, thank you for them! :-)

Richard Surpris says:

great video. i’m a student in 1301 and my professor helps but this really put the nail in the proverbial coffin. thank you for your help charlie

iFuu says:

Plz replace my indian prof.

WickedZZzY says:

This was very helpful! Thanks for the videos.

Coby Dykler says:

Whoever disliked this video is retarded. Best explanation on YouTube.

Alan Mathew says:

very helpful thank u

Dhinesh says:

thanks its very useful

Unusual Gaming Moments says:

Thank you so much for this tutorial, understood in 10 minutes what my teacher tried to teach in one week.

Muhammad Hassan Dotani says:


ziffler1 says:

really good video thanks I now understand how it works

Usama Shakeel says:

Way better than my teacher at the University.

Steven H Wang says:

Thank you! This is so much more helpful than just reading my class powerpoint slides.

Marcus says:

Wow the way you explained the definition of method was so easy to understand. Im a beginner programmer learning java and I had difficulties understanding how methods work and after watching this vid im now much clearer about how methods work. Thanks m8 :)

giga impact says:

thanks buddy!

TheLeafHasAwokened says:

Is there a way to write a factorial method in java

The gamer says:

when I make a method about command like ( moveForward (); ) in game for example. .
how I can call it ?

Shablo5 says:

Buddy I know you probably won’t see this but man is this a great way to teach this. I’m a computer science student, was just looking for a ‘textbook definition of a method’, stumbled upon your video and watched it the whole way through. Not only did it further enhance my understanding and make me confident about methods, but it felt like I had fun just watching you talk about it. Great job!

Ghastly F says:

Brilliant and easy to understand, you and @thenewboston have the best tutorials

shariar1995 says:

omg.. thanks.. I hate other tuts that over complicate things

Olivier Sama says:

thanks, very clear and well explained

Stephaughn Alston says:

What version of Eclipse is this?

pitamber paudel says:


Mythily Eswaramoorthy says:

Best explanation ever! Thanks a million :)

David says:


Yara Sweet says:

You are a beast . thank you <3

DAMN says:

You had to zoom a little bit more, good teaching thouh…

patriciaincanada says:


Mei Li says:

wow. this is an amazing lecture!

shakil khan says:

I dont know how to thank you….you are simply awesome….

Anthony Jarrett says:

beautifully explained….

Andreas says:

God dammit .. sooooo freakin good explaination. Instant subscribtion.

David Hughes says:

It’s six years in the future but here goes. Trying to learn Java I discovered I learn better reading right to left it seems to make more sense. I noticed the author works from the bottom up is it common to program that way?

Emyr Griffiths says:

Good vid thanks

Felipe Reyes says:

Yes, great job explaining what methods are and how they function. Makes things easier going forward!

Debie Shabastian says:


Hunerbun says:

Dumb question. What program are you running all of this in?

Charles Rodriguez says:

Very helpful, thank you!

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours