> usually we are using equal for strings,but can
> we use equal for checking whether any two
> objects are equal or not?
What makes you think equals() is merely for Strings? It's not, it's a method declared on java.lang.Object. But as the other guy said, this isn't the right forum for the question