Commit 18a9ba2e authored by WORKSHOP's avatar WORKSHOP

文字化けしたコメントを修正

parent 294ccb14
...@@ -15,8 +15,7 @@ import org.junit.jupiter.api.Test; ...@@ -15,8 +15,7 @@ import org.junit.jupiter.api.Test;
class Test1 { class Test1 {
/** /**
* {@link HttpClient}のサンプル * {@link HttpClient}のサンプル
* Java11から登場した{@link HttpClient}クラスを使ったHTTP通信のサンプルです
*/ */
@Test @Test
...@@ -64,12 +63,12 @@ class Test1 { ...@@ -64,12 +63,12 @@ class Test1 {
System.out.printf( "ld = %02d/%02d/%02d\n", ld.getYear(), ld.getMonthValue(), ld.getDayOfMonth() ); System.out.printf( "ld = %02d/%02d/%02d\n", ld.getYear(), ld.getMonthValue(), ld.getDayOfMonth() );
System.out.printf( "%s から本日までの日付 = %d日\n", System.out.printf( "%s から本日までの日付 = %d日\n",
ld.format(DateTimeFormatter.ofPattern("yyyy/MM/dd")), ld.format(DateTimeFormatter.ofPattern("yyyy/MM/dd")),
ChronoUnit.DAYS.between(ld, LocalDate.now())); ChronoUnit.DAYS.between(ld, LocalDate.now()));
LocalDateTime ldt = LocalDateTime.parse("2022-03-13 22:10:00", DateTimeFormatter.ofPattern("yyy-MM-dd HH:mm:ss")); LocalDateTime ldt = LocalDateTime.parse("2022-03-13 22:10:00", DateTimeFormatter.ofPattern("yyy-MM-dd HH:mm:ss"));
System.out.println( "2022-3-13 22:10:00のLocalDateTime=>"+ ldt.format(DateTimeFormatter.ofPattern("yyy-MM-dd HH:mm:ss"))); System.out.println( "2022-3-13 22:10:00LocalDateTime=>"+ ldt.format(DateTimeFormatter.ofPattern("yyy-MM-dd HH:mm:ss")));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment