Skip to content

Conversation

@mike-turintech
Copy link
Member

This pull request refactors the print statements across multiple methods in the App class to utilize System.out.printf instead of the previous System.out.println(String.format(...)) approach. The changes enhance code readability and reduce line count while maintaining the same functionality.

Key Changes:

  • Single Method: Updated print statements for SumRange, MaxArray, and SumModulus.
  • Double Method: Refactored double_() method print statements for SumSquare, SumTriangle, CountPairs, and CountDuplicates.
  • Vector Method: Modified print statements in vector() for ModifyVector, SearchVector, SortVector, ReverseVector, RotateVector, and MergeVectors.
  • Primes Method: Changed print statements in primes() for IsPrime, SumPrimes, and PrimeFactors.
  • Sort Method: Updated print statements in sort() for SortVector, DutchFlagPartition, and MaxN.

Benefits:

  • Improved clarity of output formatting.
  • Reduced verbosity by eliminating nested String.format calls.
  • Enhanced maintainability and readability of the code.

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.

3 participants