title: When I split a String input into an array, the array only has 1 Element. Why is that?
body: <p>When I split a String input into an array, the array only has 1 Element. Why is that? Been at this since yesterday, I have yet to find a solution. I used this to help me a bit <a href="https://stackoverflow.com/questions/8348591/splitting-string-and-put-it-on-int-array">Splitting String and put it on int array</a> </p>
  
  <pre><code>class ISBNcheck2 {
      public static void main(String[] args) {
          Scanner keyboard = new Scanner(System.in);
          System.out.print("Enter input: "); //ask for input
          String input = keyboard.nextLine(); // read input
          int length = input.length();
  
          String[] strArray = input.split(" "); //&lt;---- THIS IS A PROBLEM, MY GUESS.
          // SOMEHOW strARRAY and intARRAY ONLY HAVE 1 ELEMENT STORED.?????
  
          int[] intArray = new int[strArray.length];
          for (int i = 0; i &lt; strArray.length; i++) {
              intArray[i] = Integer.parseInt(strArray[i]);
          }
  
          for (int i = 0; i &lt; intArray.length; i++) {
              System.out.println(intArray.length); // just a check
              System.out.println(intArray[i]); // just a check
          }
  
          //System.out.println();
          if (isIntegerclass.isValidISBN(input) &amp;&amp; length == 10) {
              System.out.println("True: ");
  
              // I WANT TO BE ABLE TO ACCESS THE ELEMENTS LIKE THIS. BUT IT HAS ONLY 1 ELEMENT FOR SOME STRANGE REASON.
              System.out.println(" " + intArray[0] + " - " + intArray[1] + " " + intArray[2] + " " + intArray[3] + " - " + intArray[4] + " " + intArray[5] + " " + intArray[6] + " " + intArray[7] + " " + intArray[8] + " - " + intArray[9]); //print
          } else {
              System.out.println("This is not the right input...");
              System.out.println("The number must be 10 letters(numbers only) long. No need for dashes in between.");
              System.out.println("[] - [][][] - [][][][][] - []");
          }
      }
  }
  </code></pre>