title: Scan input.nextInt() but the input is a character
body: <pre><code>        int[] arr1 = new int[4];
          int[] arr2 = new int[2];
     \\this is a method to scan the arrays
           for (int i = 0; i &lt; arr.length; i++) {
              try {
                  if (input.hasNext()) {
                      arr[i] = input.nextInt();
                  }
              } catch (Exception e) {
                  System.out.println("Finished!");
              }
         \\at the main function 
              System.arraycopy(arr1, 0, arr3, 0, arr1.length);
              System.arraycopy(arr2, 0, arr3, arr1.length, arr2.length);
              for (int i = 0; i &lt; arr3.length; i++) {
              System.out.print(arr3[i] + " ");
          }
  </code></pre>
  
  <p>I fixed it but i am the result is wrong ...  the first array input is 4 5 h for the second array is 7 8 1 .  the output is 4 5 0 0 7 8 .... i don't want the zeros also the last element is messing </p>
  
  <p>Thank you all so much! </p>