Given:
2. public class Main { 3. static int count = 0; 4. public static void main(String[] args) { 5. assert(doShape(5)); 6. } 7. static boolean doShape(int x) { 8. count += x; 9. return true; 10. } }
Which are true? (Choose all that apply.)
D and E are correct
D and E are correct (and C is incorrect) because "assert" was not a keyword until Java 1.4.
A is incorrect because -ea is a java command, not javac.
B is incorrect because an assertion should never cause a state change.
F is incorrect based on the above.