Chapter 3: Using the Basic Building Blocks 55 (Paypal web hosting)
Chapter 3: Using the Basic Building Blocks 55 tells the computer to display You ll love Java!This line is known as a statement. In Java, a statement is a direct instruction that tells the computer to do something (for example, display this text, put 7 in that memory location, make a window appear). class Displayer { public static void main(String args[]) { System.out.println(”You’ll love Java!”); } } A statement (a call to the System.out.println method) Figure 3-4: A Java statement. Of course, Java has different kinds of statements. A method call, which I introduce in The Java method, earlier in this chapter, is one of the many kinds of Java statements. Listing 3-3 shows you what a method call looks like, and Figure 3-4 also contains a method call that looks like this: System.out.println( You ll love Java! ); When the computer starts executing this statement, the computer calls a method named System.out.printlninto action. (Yes, in Java, a name can have dots in it. The dots mean something.) To learn the meaning behind the dots in Java names, see Chapter 7. Figure 3-5 illustrates the System.out.printlnsituation. Actually, two methods play active roles in the running of the Displayerprogram. Here s how they work: There s a declaration for a main method. I wrote the mainmethod myself. This mainmethod is called automatically whenever I start running the Displayerprogram. There s a call to the System.out.println method. The method call for the System.out.printlnmethod is the only statement in the body of the mainmethod. In other words, calling the System.out.println method is the only thing on the mainmethod s to-do list. The declaration for the System.out.printlnmethod is buried inside the official Java API. For a refresher on the Java API, see the sections, The grammar and the common names and The words in a Java program, earlier in this chapter.
If you are in search for clan hosting account you just came in to right place. We host many clan websites in almost all popular games like Counterstrike, Call Of Duty and other. More details about our offer you can find inside clan web hosting section.