DateFormat.equals(Object obj) has the following syntax.
public boolean equals(Object obj)
In the following code shows how to use DateFormat.equals(Object obj) method.
import java.text.DateFormat; public class Main { public static void main(String args[]) { DateFormat df1 = DateFormat.getDateInstance(); DateFormat df2 = DateFormat.getTimeInstance(); System.out.println(df1.equals(df2)); } }
The code above generates the following result.