Page 69 - Viva ICSE Computer Studies 8 : E-book
P. 69

Compiling and Running

                    Follow these steps to compile and run a program.

                      1. Write a code as shown.
                      2.  Click on the Compile button present on top of the ‘Ribbon’. If your program is error free
                           then it will display a message in the lower pane of the window ‘Class compiled - no
                           syntax errors’.

                      3.  Click on the Close button.
                                                                                                             Step 3

                                     Step 2                              Step 3








                                     Step 2







                      4.  A ‘BlueJ’ window appears. Right-
                           click on the class icon. Select the
                                                                                                                Step 4
                           void main(String[]args) option
                           from the displayed menu.












                                                           5.  A ‘BlueJ: Method Call’ dialog box is displayed. Click
                                                                on the OK button.


                       Step 5
                                                                                                  Step 6



                      6.  The output will be displayed on the
                           ‘BlueJ Terminal’ window.




                                                  Learn More

                                            You can modify a program by double-clicking on the class
                                            icon. Make the changes and recompile a program.



                                                                                                                    57
   64   65   66   67   68   69   70   71   72   73   74