When the expression value % 2 evaluates to 0, the integer is even, so the first case executes. However, because there is no break statement in the first case, the statement at line 7 will also execute. So outputJTextField will always contain "Odd Integer" after the preceding switch statement executes.
```
1 switch ( value % 2 )
2 {
3 case 0:
4 outputJTextField.setText( "Even Integer" );
5
6 case 1:
7 outputJTextField.setText( "Odd Integer" );
8 break;
9
10 } // end switch
```
When the expression value % 2 evaluates to 0, the integer is even, so the first case executes. However, because there is no break statement in the first case, the statement at line 7 will also execute. So outputJTextField will always contain "Odd Integer" after the preceding switch statement executes.
```
1 switch ( value % 2 )
2 {
3 case 0:
4 outputJTextField.setText( "Even Integer" );
5 break;
6
7 case 1:
8 outputJTextField.setText( "Odd Integer" );
9 break;
10
11 } // end switch
```
You might also like to view...
An administrator works for a law firm in an office building in a major city. After installing a new wireless access point, the administrator secures the device using WPA and then connects to it using a laptop. Which of the following would be the logical NEXT step in securing the device?
a) Add a second SSID broadcast to the access point and name it the same as a neighboring company b) Change the wireless encryption type to WEP c) Remove the antennas d) Check neighboring offices for connectivity and reduce the signal strength appropriately
A Windows 10 user is copying a file from the C:\data folder to the E:\data folder. The C: drive is formatted with NTFS, and the D: drive is formatted with FAT32. What happens to the permissions of the file on the D:\ drive when copied?
A. The file cannot be copied from NTFS to FAT32. B. The file will retain its permissions. C. The file will inherit the permissions of the destination. D. The file will lose all permissions.