Both GregorianCalendar can do calculations with day of year (which seems to be what your JJJ number represents) as well as other more common fields like month and day of month. Either could be used to solve this. If the inputs and outputs are text, I'd probably use SimpleDateFormat; otherwise GregorianCalendar.
Check out java.util.Calendar:
But you'll find that returns 20110410, not 20110409. That's because April 10th is the 100th day of the year: 31 for January, 28 for February and 31 for March makes 90. That leaves 10 for April.