Page 56 - Trackpad_ipro 4.1_Class8
P. 56

If your program is successfully compiled, a message Class compiled – no syntax errors will

                  appear at the bottom of the code editor window.







                                                                            2  Right-click on the
                                                                            HelloWorld class icon.
















                              3  Select the void main (String args[]) option.
                                                                                   4  Click on the OK button.

                  The output of your program will appear in the Terminal Window as:
















                   Tech


                     Funda

                                   If you want to make any changes to a program, then double-click on the class
                                   icon and make the required changes. After making the required changes, you
                                   need to compile the program again.

                      STRUCTURE OF A JAVA PROGRAM


                  The  program  created  in  the  previous  section  contains  a  single  class  named  HelloWorld,
                  which is declared by using the class 'keyword'. The curly brackets { } are used to start and
                  end the body of the class. The HelloWorld class has one method named main( ). The main( )
                  method is declared by using three Java keywords, which are 'public', 'static', and 'void'.
                  The main() method must look like:
                                         public static void main(String args[])




                    54     iPro (Ver. 4.1)-VIII
   51   52   53   54   55   56   57   58   59   60   61