title: Adding infinity value to an array
body: <p>I want to add an infinity value to the last index of an array. I tried something like this in my java code. My array is an integer type.</p>
  
  <pre><code>Integer myInf = Integer.MAX_VALUE;
  array_name[length_of_array]=myInf;
  </code></pre>
  
  <p>It is not working. What might be the problem in my code?</p>