beware, A java class cannot contain multiple fields with the same name.
A java method is basically composed of two key words : an Access modifier and a Return type plus the Function identifier. A function could have a list of parameters but it is not mandatory.
let's decompose the setVariableName function.
from the above example, we have:
For example, the parameter list below contains four elements of various data types.
The return type could be any possible data type.The example below has two methods, one that returns an integer and another that returns boolean.
Each method has its signature, and it is what define the uniqueness of a function. A Class cannot contain two methods with the same signature. a method signature is composed of the Function identifier and The parameters list data types order.
For instance, the code below won't compile because the two methods have the same identifier and even though the parameter lists are not the same, they have the same data types order.