Java tutorial
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)); } }