Page 83 - computer science (868) class 11
P. 83

Step 13:   Right-click on the red object name and select the method sumaverage().























                 Step 14:  Input the values in the respective text box and click on the OK button. The output will be shown in the
                         “Terminal Window”.



















                     3.6 ERRORS IN JAVA PROGRAMS
                 While solving a Java problem, we sometimes come across certain situations or a code that results in an unpredictable
                 result and execution is stopped or outputs a wrong answer. These are known as errors in Java. It gives rise to an
                 exception. It should be debugged while testing the program.


                                                               Definition

                       During execution of a program, the occurrence of any error stops the execution. This situation is known as an
                       exception.





                                                                                                                        81
                                                                     Introduction to Object-Oriented Programming Using Java   81
   78   79   80   81   82   83   84   85   86   87   88