Is it possible to have same hashcode for different strings using java\'s hashcode function?or if it is possible then what is the % of its possibility?
Yes, it is possible for two Strings to have the same hashcode - If you take a look at the Wikipedia article, you will see that both "FB" and "Ea" have the same hashcode. There is nothing in the method contract saying a hashCode() should be used to compare for equality, you want to use equals() for that.
Since Java 1.2, String implements hashCode() by using a product sum algorithm over the entire text of the string.