Spring Dependency Injection With Examples

This post shows what is dependency injection in Spring framework along with examples of injecting dependencies using XML configuration as well as using annotations. Table of contents What is dependency injection Dependency injection in Spring Spring dependency injection example with XML configuration Spring dependency injection example with annotations What is…

Continue reading

Summarizing Collectors in Java Stream

In this tutorial you’ll learn about the different summarizing collectors in Java Stream API that returns a summary statistics Collectors. Summarizing collectors in Collectors class There are three summarizing collector methods in Collectors class which are as following- summarizingInt(ToIntFunction<? super T> mapper)– Returns a Collector which applies an int-producing mapping…

Continue reading