Saurabh Agrahari wrote:I understand that ob is the array of Object refrences and arr1 is the array of primitives so they are incompatible .Is this the only reason ?
Yes.
Is there a way to check the types for compatibility ?.Please advice.
Many, but without more clarification it's difficult to know
what to advise.
An Object[] can accept an array of any reference (ie, object) type, but not of a primitive type.
My suggestion: back up and explain
what you want to do, not how you want to do it.
Winston