Chapter 3: Using the Basic Building Blocks 53 (Graphic web design)
Chapter 3: Using the Basic Building Blocks 53 Listing 3-3: A Method Call FixTheAlternator(junkyOldFord); Don t scrutinize Listings 3-2 and 3-3 too carefully. All the code in Listings 3-2 and 3-3 is fake! I made up this code so that it looks a lot like real Java code, but it s not real. What s more important, the code in Listings 3-2 and 3-3 isn t meant to illustrate all the rules about Java. So, if you have a grain of salt handy, take it with Listings 3-2 and 3-3. Now that you have a basic understanding of what a method is and how it works, you can dig a little deeper into some useful terminology: If I m being lazy, I refer to the code in Listing 3-2 as a method. If I m not being lazy, I refer to this code as a method declaration. The method declaration in Listing 3-2 has two parts. The first line (the part with FixTheAlternatorin it, up to but not including the open curly brace) is called a method header. The rest of Listing 3-3 (the part surrounded by curly braces) is a method body. The term method declaration distinguishes the list of instructions in Listing 3-2 from the instruction in Listing 3-3, which is known as a method call. A method s declaration tells the computer what happens if you call the method into action. A method call (a separate piece of code) tells the computer to actually call the method into action. A method s declaration and the method s call tend to be in different parts of the Java program. The main method in a program Figure 3-3 has a copy of the code from Listing 3-1. The bulk of the code contains the declaration of a method named main. (Just look for the word main in the code s method header.) For now, don t worry about the other words in the method header the words public, static, void, String, and args. I explain these words in the next several chapters. Like any Java method, the mainmethod is a recipe. How to make biscuits: Heat the oven. Roll the dough. Bake the rolled dough. or How to follow the main instructions for a Displayer: Print You ll love Java! on the screen.
You need web hosting, easy to use web template and great support. What else could I ask for?All of our reseller accounts include free web hosting templates just check web hosting templates for more information.