Chapter 4: Making the Most of Variables and (Web server certificate)

Chapter 4: Making the Most of Variables and Their Values 77 I copied the lines from Listing 4-1 and put them into a complete Java program. The program is in Listing 4-2. When I run the program in Listing 4-2, I get the output shown in Figure 4-3. Listing 4-2: A Program Uses amountInAccount import static java.lang.System.out; class Millionaire { public static void main(String args[]) { double amountInAccount; amountInAccount = 50.22; amountInAccount = amountInAccount + 1000000.00; out.print( You have $ ); out.print(amountInAccount); out.println( in your account. ); } } Figure 4-3: Running the program in Listing 4-2. In Listing 4-2, look at the first line in the body of the mainmethod. double amountInAccount; This line is called a variable declaration. Putting this line in your program is like saying, I m declaring my intention to have a variable named amountIn Account in my program. This line reserves the name amountInAccount for your use in the program. In this variable declaration, the word double is a Java keyword. This word double tells the computer what kinds of values you intend to store in amountInAccount. In particular, the word double stands for numbers between 1.8 10308 and 1.8 10308. (These are enormous numbers with 308 zeros before the decimal point. Only the world s richest people write checks with 308 zeros in them. The second of these numbers is one-point-eight gazazzo-zillionkaskillion. The number 1.8 10308, a constant defined by the International Bureau of Weights and Measures, is the number of eccentric computer programmers between Sunnyvale, California, and the M31 Andromeda Galaxy.)
As web cam capabilities have been added to instant messaging text chat services such as Yahoo Messenger, AOL Instant Messenger (AIM), MSN Messenger and Skype, one-to-one live video communication over the internet has now reached millions of mainstream PC users worldwide.You can see details on web cam web hosting section.

Leave a Reply