I need to get / print on command line every full hour of every day of a given year, e.g. 2011 but I am struggling to code it in Java.
Has anybody ever coded this issue?
you could easily solve this by using the joda-time library:
org.joda.time.Hours.hoursBetween( new org.joda.time.DateMidnight(2012,1,1).toLocalDate(), new org.joda.time.DateMidnight(2013,1,1).toLocalDate() ).getHours();