In a class called Symmetric with a main() method. The main() method accepts an arbitrary number of command line arguments including none. It determines if the command line arguments are symmetric: first equal to last, second equal to second to last, and so forth. If the arguments are symmetric, the expression

```
All args symmetric

```

is printed. If an asymmetry is found a message like

```
Not symmetric at arg 1:b and 2:a

```

is printed where the numbers correspond to the argument index (starting form 0) and the letters correspond to the actual arguments.
Example runs are below.

```
> javac Symmetric.java 
> java Symmetric
All args symmetric
> java Symmetric a
All args symmetric
> java Symmetric a a
All args symmetric
> java Symmetric a b
Not symmetric at arg 0:a and 1:b
> java Symmetric a b a
All args symmetric
> java Symmetric a b a c
Not symmetric at arg 0:a and 3:c
> java Symmetric a b a a
Not symmetric at arg 1:b and 2:a
> java Symmetric c a b a b a c
All args symmetric
> java Symmetric c a b d b a c
All args symmetric
> java Symmetric c a b d r a c
Not symmetric at arg 2:b and 4:r

```

here are my codes:

```
public class Symmetric{
  public static void main (String[] args) {
     int i =0;
     int j=args.length-1;

     if (args[i].equals(args[j])==false){
       System.out.println ("Not symmetric at arg "+i+":"+args[i]+" and "+j+":"+args[j]);
     }
     while(args[i].equals(args[j]) && i<=j) {
       if (i==j || i==j-1 || i==j-2){     
         System.out.println ("All args symmetric");
        // System.exit(1);
       }
       i++;
       j--;
     }         
  }
}

```

I can pass all the examples above except the first two. when I enter 

```
java Symmetric
java Symmetric a   

```

I always get ArrayIndexOutofBoundsException. How can i deal with the situation that no value is passed in or just one value is passed in?