import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Dog dog1 = new Dog();
Dog dog2 = new Dog();
System.out.println(dog2.equals(dog1));
}
public static class Dog{
}
}
The objects are the same, but equals method says its false. Why? Is it not true? Class is empty. Thanks in advance
equals
method.