Commanding The Demons
From Huben's Wiki
Line 24: | Line 24: | ||
*** What you will pay the demon. This price is called the '''arguments''' of the method, and for this demon there is a standard price. Not blood as you may think, but 'String[] args'. These too shall be made clear as we progress. You will notice that the '''arguments''' are enclosed in ordinary parentheses. | *** What you will pay the demon. This price is called the '''arguments''' of the method, and for this demon there is a standard price. Not blood as you may think, but 'String[] args'. These too shall be made clear as we progress. You will notice that the '''arguments''' are enclosed in ordinary parentheses. | ||
** A '''signature''' can be recognized by residing within the class body and having a name followed by arguments enclosed in parentheses. Betimes there will be a long list of arguments inside the parentheses. Other times there will be no arguments but still there will be parentheses to show where they might be: '()'. Fear not the complexity of the arguments; recognize only that they are enclosed in parentheses. | ** A '''signature''' can be recognized by residing within the class body and having a name followed by arguments enclosed in parentheses. Betimes there will be a long list of arguments inside the parentheses. Other times there will be no arguments but still there will be parentheses to show where they might be: '()'. Fear not the complexity of the arguments; recognize only that they are enclosed in parentheses. | ||
+ | ** Other important names of the '''signature''' include '''declaration''' and '''header'''. | ||
* The second part of the '''method''' is called the '''body'''. | * The second part of the '''method''' is called the '''body'''. | ||
** Just as the class body is enclosed in curly braces, so a method body is enclosed in curly braces. And again, curly braces make a block and so a method body is a block. | ** Just as the class body is enclosed in curly braces, so a method body is enclosed in curly braces. And again, curly braces make a block and so a method body is a block. |