How to override equals() for a Class with string array?
<p>I require clarification on String[] comparison inside Object's equal method. 
Below is my code snapshot. When I execute this code, it gives true and false instead of true and true.
Also in my case Task class generate unique id for each call. 
What am I doing wrong? any suggestion would be appreciated.</p>

<pre><code>public class JobTask extends Task {

    String[] args;

    public WFTask(String[] args) {
        this.args = args;
    }
    @Override
    public boolean equals(Object obj) {        
            if (! ( obj instanceof String[] ) ){
            return false;           
            }
            String[]  arguments = (String[] ) obj;
            boolean ret = Arrays.equals(this.args , arguments );
            return ret;
    }
    @Override
    public void execute(TaskExecutionContext context) throws RuntimeException {
            --------------
            --------------
    }
    public static void main(String[] args) {
            String[] arg1 = {"a","b","c"};
            String[] arg2 = {"a","b","c"};
            System.out.println( Arrays.equals(arg1,arg2));
            JobTask t1 = new JobTask(arg1);
            JobTask t2 = new JobTask(arg2);
            System.out.println( t1.equals(t2));
    }
}

public abstract class Task {
    private Object id = GUIDGenerator.generate();
    public Task() {
    }
    Object getId() {
       return id;
    }
    public abstract void execute(TaskExecutionContext context)                  throws RuntimeException;
}
</code></pre>
