Printing Two Dimensional Array
<p>I am working in a small task that allow the user to enter the regions of any country and store them in one array. Also, each time he enters a region, the system will ask him to enter the neighbours of that entered region and store these neighbours.</p>

<p>I did the whole task but I have small two problems:</p>

<ol>
<li>when I run the code, the program does not ask me to enter the name of the first region 
       (This is happened only to the first region)</li>
<li>I could not be able to print each region and its neighbours like the following format:
       Region A:   neighbour1     neighbour2
       Region B:   neighbour1     neighbour2
and so on.</li>
</ol>

<p>My code is the following:</p>

<pre><code>import java.io.*;
import java.util.Arrays;
import java.util.Scanner;

public class Test6{

public static void main(String[] args) {

    Scanner kb = new Scanner(System.in);

    System.out.print("Please enter the number of regions: ");
    int REGION_COUNT = kb.nextInt();

    String[][] regions = new String[REGION_COUNT][2];
    for (int r = 0; r &lt; regions.length; r++) {
        System.out.print("Please enter the name of region #" + (r+1) + ": ");
        String region = kb.nextLine();
        System.out.print("How many neighbors for region #" + (r+1) + ": ");
        if (kb.hasNextInt()) {
            int size = kb.nextInt();
            regions[r] = new String[size];
            kb.nextLine();
            for (int n = 0; n &lt; size; n++) {
                System.out.print("Please enter the neighbour #"
                    + (n) + ": ");
                regions[r][n] = kb.nextLine();
            }
        } else System.exit(0);
    }

    for(int i=0; i&lt;REGION_COUNT; i++){
        for(int k=0; k&lt;2; k++){
            System.out.println(regions[i][k]);
            }
        }        
    }
}
</code></pre>

<p>Thanks everybody for your immediate helps. But let me explain to you what I want in more details.</p>

<p>First of all, I need to use the two dimensional array.</p>

<p>Secondly, my problem now is just with the printing of the result. I want to print the results like the following format: </p>

<pre><code>&gt; RegionA :  its neighbours
</code></pre>

<p>For example, let us take USA </p>

<pre><code>&gt; Washington D.C:  Texas, Florida, Oregon
--------------------------------------------------------------------------
</code></pre>

<p>Dear ykartal,</p>

<p>I used your program and it gave me the following:</p>

<p><img src="http://i.stack.imgur.com/27L01.png" alt="alt text"></p>
