title: Possible Lossy conversion from long to int
body: <p>I wish to enter one <code>int</code> and another <code>long</code> ex: 1 and 1000000000, and now I wish to create an array of size 1000000000. And then at each index of array, store int val, ex: <code>arr[100000000] = 4</code>.    </p>
  
  <p>When I'm trying to do this Netbeans shows me an error in this line: </p>
  
  <pre><code>arr = new long[y+1]` and `arr[j] = 0` 
  </code></pre>
  
  <blockquote>
    <p>"Possible Lossy conversion from long to int".
                                                                                                                                             Here's my code:-</p>
  </blockquote>
  
  <pre><code>public static void main(String[] args) throws IOException       
  {     
      BufferedReader s = new BufferedReader(new InputStreamReader(System.in));           
      String[] xe = s.readLine().split(" ");          
      int x = Integer.parseInt(xe[0]);        
      long y = Long.parseLong(xe[1]);
      long []arr;    
      arr = new long[y+1];     
      for(long j=0;j&lt;=y;j++)     
      arr[j] = 4;     
  } 
  </code></pre>