Problems with scanner
<p>I have a problem with my scanner and nextLine. What happens is that it skips the first lap of the loop. My guess is that the scanner already contains something here, like a line break or something. It did work if I used two different scanners for the strCount and the one in the loop. Is this right and if it is, is there any way I can make this work without using two different scanners.</p>

<pre><code>import java.util.*;

public class chars_in_string {
public static void main(String[] args) {
    Scanner key = new Scanner(System.in);

    System.out.print("Number of strings?");
    int strCount = key.nextInt();
    String [] array = new String[strCount];

    for(int x = 0; x &lt; strCount; x++){

        System.out.print("String "+(x+1)+":");
        array[x] = key.nextLine();

    }
}

}
</code></pre>

<p>Example of the input/output:</p>

<p>Number of strings? 8</p>

<p>String 1:String 2:</p>

<p>From here it works fine to enter any string and it will just jump 1 step in the loop to get the next one.</p>
