본 내용은 <자바의 정석> 내용을 복습, 정리하였습니다.
double number = 1234567.89
DecimalFormat df = new DecimalFormat("#.#E0");
String result = df.format(number);
Date today = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String result = df.format(today);
double[] limits1 = {60, 70, 80, 90}; // 작은 값부터 적어야 함
String limitsPattern = "60#D|70#C|80#B|90#A"; // #은 경계값 포함, <는 포함 X
String[] grades = {"D", "C", "B", "A"}; // limits와 개수가 동일해야 함
ChoiceFormat form = new ChoiceFormat(limits1, grades);
String msg = "Name: {0} \nTel: {1}";
Object[] arguments = {"코코볼", "010-0000-0000"};
String result = MessageFormat.format(msg, arguments);
LocalDate today = LocalDate.now();
LocalTime now = LocalTime.now();
LocalDate birthDate = LocalDate.of(1999, 12, 31);
LocalTime birthTime = LocalTime.of(23, 59, 59);
// LocalDateTime -> ZonedDateTime 변환
ZoneId zid = ZoneId.of("Asia/Seoul");
ZonedDateTime zdt = LocalDate.now().atStartOfDay(zid);
// TemporalAdjuster 인터페이스
@FunctionalInterface
public interface TemporalAdjuster {
// 해당 메서드를 오버라이딩
Temporal adjustInfo(Temporal temporal);
}