public void addOne(int n) { try { myArray[n] += 1; } // end try catch (ArrayIndexOutOfBoundsException e) { System.out.println("The element you requested, " + n + ", is not available."); } // end catch } // end addOne public void addValue(int n, int value) { try { for (int i = 1; i <= value; i++) { addOne(n); } // end for } // end try catch (ArrayIndexOutOfBoundsException e) { System.out.println("The element you requested, " + n + " is not available."); e.printStackTrace(); } // end catch } // end addValue