質問するログイン新規登録

回答編集履歴

2

質問文に合わせ修正

2017/06/27 04:57

投稿

mattn
mattn

スコア5030

answer CHANGED
@@ -7,7 +7,7 @@
7
7
  public static void main(String[] args) {
8
8
  LocalDateTime now = LocalDateTime.now();
9
9
  // 日付を +1 して時を 9、分を 0 に
10
- now = now.plusDays(1).withHour(9).withMinute(0).withSecond(0).withNano(0);
10
+ now = now = now.plusHours(15).withHour(9).withMinute(0).withSecond(0).withNano(0);
11
11
  System.out.println(now);
12
12
  }
13
13
  }

1

修正

2017/06/27 04:57

投稿

mattn
mattn

スコア5030

answer CHANGED
@@ -7,7 +7,7 @@
7
7
  public static void main(String[] args) {
8
8
  LocalDateTime now = LocalDateTime.now();
9
9
  // 日付を +1 して時を 9、分を 0 に
10
- now = now.plusDays(1).withHour(9).withMinute(0);
10
+ now = now.plusDays(1).withHour(9).withMinute(0).withSecond(0).withNano(0);
11
11
  System.out.println(now);
12
12
  }
13
13
  }