 So one of the things that we use a lot in Java is known as a method but there's a lot of kind of Mystical keywords and magical words that we we throw out there when we start talking about Methods, and I just want to look at them So let's actually just look at something basic looks look at our main method the thing that we've been writing Pretty much since the start of the class public static void Main string arcs So we've been writing out this every time and the first part these two words right here public static These fall into what we call our visibility modifier now Publix more what really falls into visibility, but said it kind of falls in as well You know where it kind of falls in line How many there are and for our sake at least in the beginning this is where all of this kind of falls in place We're talking about a very specific kind of method in our case that's Open to everyone and there's only one of it So again, it's how we start everything off for our sake in this class Generally speaking you will be safe with typing out public static first to everything But then we get into this return type now main Uses what's known as a void return type, which means it does not return anything Meaning you won't see a return statement now if you've ever programmed in say for example C C actually has a return type and it's always like return one just to indicate that the program did run successfully Java's a little higher up a little more advanced. We don't need that What we're saying is this method is not going to you know give it to anything else it once it's done It is done. Don't worry about the livelihood of it. I guess But then we get sort of this main method Portion the main Well, that is just my method name. I need to refer to it in some way and the way we can look at a method is This is actually the same way we would treat a variable If we look at a variable for a second or if we look at a more built-up method besides ours This guy right here this name Is just my way as a programmer to refer back to it because what's going on is Everything inside of these curly braces are Instructions those instructions have to be stored for later use. It's like we're writing a recipe So what happens when we design out a method is it actually goes sort of into memory That way I can use it for later So when we write the main method it goes in the memory when we write say for example a method called Sama it goes into memory Now one thing you're also going to notice is in this description I say a list of parameters and again one of those For the main method is string bracket Args now later on in the semester We're gonna look at what the string bracket means, but that is just an array It's just a data type and all this args word right here is is it's just the variable That we're gonna call it we're gonna call this args and we can see that in action when we start looking at this method This method has two Parameters two data types that we're gonna throw out there and notice how they're ince I need some way to refer to them because I don't know what they are I'm just gonna call them for the sake of this little baby version. I won't I do again I don't know what they are. They can be five. They could be you know sasquatch I don't care what they're called outside of my method. I only care about what they're called inside my method That's why you know I can work like this We see the same thing actually in a few other methods that we've learned about so say for example math Dot random well math dot random you might notice there's nothing inside the parentheses. It actually takes Zero parameters Well something about something like a system Dot out dot print Hi Well, this is a string and there's only one string there So guess what that means that this actually only takes one parameter our Made method that we've got going on here. You see that it has to so guess what this takes two parameters We can actually put as many as we want we can make a zero parameter method or we could make You know, we could make an 80 parameter method. It doesn't actually matter how many we go about building Now once we've built out our code again, you see we have this interesting thing. We have this return type going on here in This is to tell me that This is what I'm expecting out of this whatever I use this method Just like when we use math dot random. We got a number from 0.0 to 0.9 We were getting a double back We're doing the exact same thing. This is telling me I'm gonna get some number back So if we think about Invoking a method that term invoking a method just calling a method Typing out sort of the special word just like we would a variable the only difference is now I'm including sort of parentheses and the parameter What I'm doing is I'm invoking the method all of this gets passed So this five and this seven that five and seven guess what five is gonna be I one Seven is gonna be I two Those go into here That's a five now. That's a seven now. So five plus seven return That value that calc again, that's gonna be a 12. So guess what that 12 comes back up here This is 12 now that Because left to right association means I calculate all of this stuff first then gets assigned to Calculated value and I can use variables. I don't have to use literals like five and seven I can Make it called X Again, I don't care what it's called outside of my method. It's called X here. It's not called X here I don't care This is where it's gonna be Evaluated it gets evaluated first because it please excuse my dear aunt Sally kicks in these parentheses X becomes five Y becomes seven that in turn Goes to my method in something known as passing by value, which we'll talk about in just a second