Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #1629

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VitalikK5
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Great job on implementing the getStatistic method! 🎉 Your code meets the core requirements of the task by correctly reading from a file, processing the data, and writing the results to another file. While there are some minor improvements suggested, such as using StringBuilder for string concatenation, defining constants for repeated strings, and employing try-with-resources for better resource management, these do not impact the functionality of your solution. Keep up the good work and consider these suggestions for future enhancements to make your code even more robust and maintainable! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨


try {
Files.write(Path.of(toFileName), report.getBytes());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using StandardOpenOption.CREATE and StandardOpenOption.TRUNCATE_EXISTING with Files.write to ensure the file is created if it doesn't exist and truncated if it does. This will make your file writing operation more robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants