KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

 My understanding of the code in class 2:

1. class hello
2. {
3. public static void main(String[] args)
4. {
5. System.out.println("Hello! It is me, JAVA boy!");
6. }
7. }

Line 1 tells me to create a class named hello. In my JAVA language, everything is inside a class. Line 2 and line 7 are two curvy braces. All you want me to do must reside inside these 2 braces.

Line 3 is main method. It is a special method in my language. It tells me where to start to find all the commands you give me. When run a program, I always look for a class with a main method and start from there. Line 4 and line 6 are 2 braces belong to this method.

Remember: braces should be paired! Left brace { pairs with right brace }, always.

Line 5 is little something new. System is a class. out is one field of System (output to the command prompt). println is a method in out. This line tells me to write out a sentence "Hello! It is me, JAVA boy!" in command prompt. println means print line. Why you don't say printline? Well, I don't say that way. I say println.

Also, did you see that semicolon ; ? Every command(computer guru say statement, whatever..) must ended with ;. Did you notice that not every line ended with ;. That is because not every line is a statement. Some lines are defining class (Line 1), defining method(line 3).


Home work

1. Imitate what you learn, create a helloDoggy class and print a line says: Hello Doggy.

2. Modify and print 3 lines greeting. You may print out anything you want to say. Be creative.


Try & Catch Exceptions
How to install JDK
Homework Solutions
JAVA JComboBox
JAVA JTabbedPane
Java JList
Best JAVA books
Head First JAVA, Second Editon

Effective Java Programming Language Guide

Professional Java, JDK 5 Edition

Ivor Horton's Beginning Java 2, JDK 5 Edition




Best books about JAVA programming from Amazon
Professional Java, JDK 5 Edition (Paperback Simply Java Programming: An Application-Driven Tutorial Approach (Paperback) Effective Java Programming Language Guide (Paperback) Head First Java, 2nd Edition (Paperback) Java : An Introduction to Problem Solving and Programming (4th Edition)


Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © All rights reserved(new). Privacy|Copyright
designed by

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer