ÇöÀç ½Ã°£À» ºñ±³ÇÏ´Â ¿¹Á¦
import java.util.*;
public class TestDateComp {
public static void main(String args[]) {
Date d1 = new Date();
try {
Thread.sleep(500);
}
catch (InterruptedException ie) {}
Date d2 = new Date();
if ( d1.before(d2) )
System.out.println("d1 came before d2");
}
}
C:\javaExample\util>javac TestDateComp.java
C:\javaExample\util>java TestDateComp
d1 came before d2
DateŬ·¡½ºÀÇ before()¸Þ¼µå¸¦ ÀÌ¿ëÇØ¼ µÎ ½Ã°£À» ºñ±³ÇÒ ¼ö ÀÖ´Ù.
jabookÀúÀÚ¸íÇÔ |
Á¦¸ñ:¼Ò¼³°°Àº¹Ì´ÏÄÚµå ÀÛ¼ºÀÚ:Àںϸâ¹ö ±è¿Ï±â |