If, during the application work, several times refer to the hashCode() method of the same object with the same condition, it will return the same value. And if you do the same after restarting the application, may this value be different?
// Simple example
public class Test {
    public static void main(String args[]) {
        Object obj = new Object();
        System.out.println(obj.hashCode());
        System.out.println(obj.hashCode());
    }
}
Explanation

HashCode() method of any object must meet the requirements listed inspecifications:
If, during the application work, several times refer to the same object, the hashCode method must consistently return the same integer.
This value is not required to remain unchanged when you restart the same application.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести