2_5323305779468442749 Apr 2026
: Results are stored and returned in an ArrayList . 💡 Technical Tips
: Use contains("!") to find the exclamation point and endsWith() to check the final character. 2_5323305779468442749
This method is more complex, requiring string searching and concatenation. : Results are stored and returned in an ArrayList
: You must only include comments that contain an exclamation point ( ! ). not null .
: You must return a double . Ensure you cast to double before dividing by the array length to avoid integer division errors. Part B: collectComments()
: If no comments match the criteria, the method should return an empty list, not null .
