Java Program for Moving Average