Welcome to my blog !

Java8 - java.util.function.Function Interface tutorial with Examples

April 7, 2022 ·  2 min read

java util Function class This is a simple Functional interface, with which the method takes as input and returns the output. This interface is used to map the objects - which takes one type as input, processes it, and returns the output in another type. This interface has only a single abstract method.java.util.function.The function is a predefined interface introduced in java 8. This post is about the predefined functional interface - Function examples with tutorials....

java8 - java.util.DoubleSummaryStatistics class example

April 7, 2022 ·  4 min read

In my previous post, discussed Introduction to Summary Statistics in java8. In this blog post, We are going to explore the DoubleSummaryStatistics class and methods with examples. What is DoubleSummaryStatistics in java? DoubleSummaryStatistics is one of the classes for creating state objects for calculating statistical operations like sum, max, min, average, and count of a double data. DoubleSummaryStatistics is for Double datatype defined in java.util package. There are other classes like IntSummaryStatistics for integer data type and LongSummaryStatistics for the long datatype....

java8 - java.time.ZoneId class tutorials with examples

April 7, 2022 ·  3 min read

What is ZoneId in Java? ZoneId is an abstract class defined in java.time package. This is used to represent timezone such as Asia/Calcutta. This provides rules for creating LocalDateTime and Instant objects. Time in the earth or world is divided into regions. Whereas each part of the region is called a time zone. Timezone is an offset or number of hours difference from Standard time zone UTC - Coordinate Universal Time....

Java8 - Java.time.Period Class example

April 7, 2022 ·  3 min read

In this tutorial, You are about java.time.Period example and how-to examples using this class in java 8. Contents What is Period in java? What is the Difference between Java.time.Period and Java.time.Duration? Java.time.Period class Example How to create a Period object? How to add/subtract many days to the current date? How to calculate age in years/months/days using Period class? Conclusion What is Period in java?...

java8 - java.time.instant class tutorial with examples

April 7, 2022 ·  5 min read

In this tutorial, You are about java.time.Instant example and how to convert to a different time and date classes in java 8. Contents What is instant in java? Instant Class Examples How to convert java.time.instant to java.util.Date in java8? How to convert java.util.Date to java.time.instant in java8? How to check if two instant dates are equal in java8? How to convert LocalDateTime to Instant in java8? How to Convert Instant to LocalTime object in java8?...

You'll get a notification every time a post gets published here.