‫Welcome back.
‫I hope you managed to write the method and the variables required for this code to run and you finished
‫the challenge.
‫So let's go ahead and create the variables of our friends.
‫So first of all, I'm going to create a variable called Friend one, and it's going to be frank then
‫friend two, which is going to be Michael and String Friend three which is going to be blood.
‫All right, so there we are.
‫We have our three friends.
‫And now I want to have a method which greets all of those friends.
‫And I need to call this method multiple times, of course, so I can pre agreed friend one, then free
‫friend two and then friend three.
‫And I'm going to create the method here.
‫Public static greet friend and in here I will need a string called friend name.
‫And you might have used a different name here.
‫By the way, we need to use void here because we don't return anything.
‫So as you can see, the error disappeared and now we can go ahead and write onto our console.
‫So write a line onto the console and this will give us something like Hi, then the name of the friend
‫plus friend, name plus comma, my friend, and of course, the exclamation mark.
‫All right, so there we are.
‫That's our method.
‫Now, of course, we need to call that method in here.
‫Greet friend.
‫And who is it?
‫It's friend one, then it's friend two and it's friend three.
‫So I'm just going to copy that and I'm going to replace one and one twice.
‫All right.
‫But that's not going to be enough because I will need console dot right at the end so that something
‫will show up onto the console or on the console.
‫So let's run that code and see what we get there.
‫And we are.
‫Hi, Frank, my friend.
‫Hi, Michael, my friend.
‫Hi, Vlad, my friend.
‫All right, so that's one way to solve it.
‫You could have, of course, solved it that way as well.
‫So you could have solved it with name two and String Friend, name three.
‫And then you could have simply.
‫Called.
‫The myth that three times the red line method and instead called grid friend only once here.
‫So grid friend friend one, friend two and friend three.
‫That will result in the same thing.
‫And you see.
‫Hi, Frank, my friend.
‫Hi, my friend.
‫And so forth.
‫So these are the two options.
‫This one is the one with multiple parameters.
‫And you don't need to call the grid grid friend method multiple times only once.
‫But well, let's just depending on the style you want to use.
‫Great.
‫I hope you could solve that yourself.
‫And now?
‫Yeah.
‫Feel free to try around with some other methods, create some methods and play around with this because
‫we will need methods a lot.
‫And of course, while we're using them in the next videos, you will get a better feeling for them and
‫will get a deeper understanding of what those are about and how to use them correctly.
‫Great.
‫So see you in the next video.