Prompt the user to enter 3 strings, each string has 3 characters
<p>I'm very new to Java and have no idea what I'm doing. I am supposed to prompt the user to enter three strings, each string has three characters and the characters will either be an 'a' or an 'b', but I'm really stuck and I don't know what to do, how to validate this conditions. Here is what I have so far:</p>

<pre><code>import java.util.Scanner;
public class Array {
    public static void main(String[]args) {

    Scanner scanner = new Scanner(System.in);

    String strings[]= new String[3];

    System.out.println("Enter the strings: ");

    for(int i=0; i&lt;3; i++) {
        strings[i] = scanner.nextLine();
    }

    char c[] = new char[3];

        if(c.length ==3){

            for (int i = 0; i &lt; c.length; i++) {
                c[i] = strings[i].charAt(i);
            }
        } else System.out.println("Error");


    System.out.println("You entered the following strings: ");

    for (int i = 0; i &lt; 3; i++) 
        System.out.println(strings[i]);
    }
}
</code></pre>

<p>Any help would be appreciated. Please keep in mind that I'm not allowed to use array list.</p>