Answer:
float avg = 23.5;
Explanation:
Given
The declarative statements
Required
Determine which of them is invalid
<em>Analyzing them one after the other;</em>
int zebraCnt = 40000;
This statement is valid as zebraCnt is correctly declared as type integer
<em></em>
long birdCnt = 222_222_222_222_222L;
This statement is valid as birdCnt is correctly declared as type long
float avg = 23.5;
This statement is invalid as avg is incorrectly declared as type float.
<em>To correctly declare avg, you either change the datatype to double: as follows;</em>
double avg = 23.5;
or <em>append f to the declaration; as follows</em>
float avg = 23.5f;
double avg = 98.32121;
This statement is valid as avg is correctly declared as type double
Hence, the incorrect declarative statement is float avg = 23.5;