Let's end with a relatively simple concept, method overloading. In Java, it is possible to define several methods with the same name, provided that they don't have the same list of parameters. That is, if the number of parameters or the types of these parameters, are different. This is known as method overloading and is very useful when we need to write methods which have similar tasks, but whose specific processes depend on the type of these parameters. So in Java, what sets these methods apart is not necessarily their names but also the types of their parameters, which is technically known as the signature of the function. Note that the return type is not part of this distinction. You cannot have two functions with the same names and the same parameters and simply with different return types. This means that I can declare 2 functions <i>f</i> where the first one has one parameter of type <i>int</i>, and the second, a parameter of type <i>double</i>. These two functions can have the same return type However, I cannot have two functions with identical names and which both have one parameter of type <i>int</i>, but which vary only in their return type. For example <i>int</i> for the first and <i>double</i> for the second. So to summarize, in Java, one can have several functions with the same name, but with different sorts of parameters. For example, I can define these 3 methods which are all named <i>affiche</i> (TN : <i>affiche</i> means <i>display</i>). These are indeed 3 different methods, since their lists of parameters are different. The first method has one parameter of type <i>int</i>; the second, one parameter of type <i>double</i>; and the third, 2 parameters of type <i>int</i>. When I call <i>affiche(1)</i>, since the argument <i>1</i> is of type <i>int</i>, the first method will be called and will display <i>entier : 1</i>. When I call <i>affiche (1.0)</i>, the argument is of type <i>double</i> and the second method will be called, thus displaying <i>réel : 1.0</i>. And when I call <i>affiche (1,1)</i>, the third method will be called. <i>x1</i> will have a value of 1 and <i>x2</i> also, meaning the method will display <i>couple : 1,1</i>. Let's end this lecture with an overview of the final version of the example with which we began this lecture. The goal is mostly to show you how the program is structured, that is, where the different methods are, and where the declaration of the <i>Scanner</i>- type variable is placed, for example. At this stage of the course, a Java program is made of one single class, which contains the <i>main</i> method here. The other methods serve to modularize the <i>main</i> method. The idea is to have a main program, a <i>main</i> method, that is as concise as possible, and auxiliary methods to make it modular. Here, we have 3 auxiliary methods which we placed after the <i>main</i> method but still within the only class which makes up our program. Actually, it could be made more modular. The <i>saisieEtCalcul</i> method could use an extra method which we could call <i>saisie</i> (TN: <i>saisie</i> means <i>input</i>) and which would take as arguments the bounds within which the value should be input. <i>saisieEtCalcul</i> could then invoke this <i>saisie</i> method, once to input the time and once more to input the score, which would avoid code duplication in the <i>while</i> loop. As you can see, we have only declared one variable of <i>scanner</i> type, outside of the method, right at the beginning of the class, right here. This variable is named <i>clavier</i> (TN : <i>clavier</i> means <i>keyboard</i>) and is available to all the methods defined between this opening brace and this closing brace. In other words, this <i>clavier</i> variable has a global scope in the entire class. Indeed, this <i>clavier</i> variable is used here and here, in the <i>saisieEtCalcul</i> method. But we can perfectly imagine that it might be useful to other methods of the program. Declaring a single <i>scanner</i>- type variable is common practice for simple programs with a single class containing a <i>main</i> method, as we have here. Since this variable corresponds to the computer's keyboard, this is quite logical, as a computer only has one keyboard. This was the last video of our lesson on methods in Java. I now invite you to answer the Quiz and to do the exercises. Good luck!