title: How to handle arrays and borders in Java
body: <p>If I have an array of integers such as below with <code>height</code> and <code>width</code>.</p>
  
  <pre><code> 1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
   1 2 3 4 5 5 6 7 8 9 10
  </code></pre>
  
  <p>If I have a kernel <code>1x5 kernel [2 2 3 4 5]</code> and I want to multiply the kernel with the value of integers. How can I ensure that the kernel is applied to the whole array EXCEPT the first and last column. </p>
  
  <p>Any help would be appreciated.</p>