This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hey sir U r doing mistake to index of array. Like U have decleared 6 elements in second row of hours array. Count correctly isn't it. so y (in the inner loop) maximum should be up to 5. But U have set y as 6 that's why it is throwing such exception. Eithe change y up to 5 or increse 1 element in second row of hours array.