Page 104 - ComputerScience_Class_11
P. 104

Step 13:   Right-click on the red object name and select the method sum_average.
























              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.



















                  4.6 ERRORS IN JAVA PROGRAMS
              While solving a Java problem, we sometimes come across certain situations or 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.






                  102  Touchpad Computer Science (Ver. 3.0)-XI
   99   100   101   102   103   104   105   106   107   108   109