Page 56 - iPlus_Ver_2.0_class_8
P. 56

Compiling and Running a Program

                  When we compile a Java program, the Java compiler converts it into bytecode. This bytecode is a
                  platform-independent code which can run on any machine without making a single change. A Java
                  compiler is a program that translates the source code written by us into machine-readable code.
                  To compile and run a program, follow the given steps:


                             1  Click on the Compile button.











                  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:













                      Quick Byte

                      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.




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