Saved Bookmarks
| 1. |
Reema wants to check whether the number is even or not but the code below is giving errors. underline the errors and help her write the correct code. If(int num%2=0); {jTextField1.setText(“even”) Else jTextField1.setText(“odd”) |
|
Answer» If(int num%2=0); {jTextField1.settext(“even”) Else jTextField1.setText(“odd”) Correct code : if(int num%2==0) jTextField1.setText(“even”); else jTextField1.setText(“odd”); (8 errors to be marked and corrected ) |
|