From 9882c2518670d6d99a0b1fa9dd4d06cec1c189f6 Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Date: Mon, 10 Feb 2020 11:44:45 +0530 Subject: [PATCH] Update java8-questions.md --- java8-questions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java8-questions.md b/java8-questions.md index c607c95..5f366ff 100644 --- a/java8-questions.md +++ b/java8-questions.md @@ -577,6 +577,10 @@ LocalDate .with ( TemporalAdjusters.nextOrSame ( DayOfWeek.SATURDAY )) .with ( TemporalAdjusters.next ( DayOfWeek.SATURDAY )); ``` +
+ ↥ back to top +
+ #### Q. How to get the current time in local time accurate to milliseconds using the Date Time API? ```java LocalDateTime.ofInstant ( new Date().toInstant(), ZoneId.systemDefault()); @@ -607,6 +611,10 @@ Base64 contains 6 basic methods: `getEncoder() / getDecoder()`- returns a base64 encoder / decoder conforming to the RFC 4648 standard ; getUrlEncoder()/ `getUrlDecoder()`- returns URL-safe base64 encoder / decoder conforming to RFC 4648 standard ; `getMimeEncoder() / getMimeDecoder()`- returns a MIME encoder / decoder conforming to RFC 2045 . +
+ ↥ back to top +
+ #### Q. How to create a Base64 encoder and decoder? ```java // Encode