• 코드:
​x
 
1
import java.time.*;
2
​
3
public class prog {
4
    public static void main(String[] args){
5
        LocalDate today = LocalDate.now();
6
        LocalDate otherDay = LocalDate.of(1982, 02, 19);
7
​
8
        System.out.println(today.compareTo(otherDay));
9
        System.out.println(today.isBefore(otherDay));
10
        System.out.println(today.isEqual(otherDay));
11
    }
12
}
표준입력 & 실행옵션