Hello!
I wanted to write a method that would return the year with the most number of hits as part of ex 4.34 of Objects First With
Java third edition.I am not happy how it has come out.I would like your advice.One thing I want to note is the finalCount is initialized to zero.if only intermidiateValue exceeds the finalCount only the maximumCountYear is updated.My point is if intermidiateValue does not exceeds Zero then maximumHourCountYear will not be updated.What I want is to find way of comparing values within the ArrayList without using preset values like zero since it may lead to a wrong out put.I do not know whether I have conveyed the message clearly, I hope you would understand.yearlyCounts is an ArrayList.reader is an object.
From here all the 4 classes are shown
The Log file is attached to execute the programme.
Regards Varuna