package objectNextPart;
public class Final {
Final(String a) {
}
public static void main(String[] args) {
Final f1 = new Final("hello");
Final f2 = new Final("hello");
System.out.println(f1 == f2);// false
System.out.println(f1.equals(f2));// false
System.out.println(f1.hashCode());// 366712642
System.out.println(f2.hashCode());// 1829164700
String f3 = new String("world");
String f4 = new String("world");
System.out.println(f3 == f4);// false
System.out.println(f3.equals(f4));// true
System.out.println(f3.hashCode());// 113318802
System.out.println(f4.hashCode());// 113318802
}
}