Saturday , April 29 2017

Recent Posts

April, 2017

  • 23 April

    How to Rotate Elements in List

    In this example tutorials, I am going to show you how to rotate elements in List. Rotate Elements in List : We can rotate elements in Java.util.List by using the Collections.rotate(List<?> list, int distance) method. The Collections.rotate(List<?> list,int distance) method rotates the elements in the given list by the given distance. Happy …

    Read More »
  • 23 April

    How to Shuffle an Array using Java

    In this example, I am going to show  you how to shuffle an array using Java. Shuffle an Array : We can shuffle an array in Java using shuffle(List<?> list) method. shuffle(List<?> list) is a static method coming from java.util.Collections class used to shuffle the given array elements. Recommended : …

    Read More »
  • 22 April

    How to calculate Employees Salaries Java 8 summingInt

    In this tutorials, I am going to show you how to calculate the total salaries of employees using Java 8 summingInt. Java 8 summingInt : summingInt(ToIntFunction<? super T> mapper) is method in Collector class. It produces the sum of a integer-valued function applied to the input elements. Like summingInt(), summingLong(ToLongFunction<? …

    Read More »
  • 22 April

    How to Filter null values from Java8 Stream

    Here I am going to show you how to filter null values from Java8 Stream. Java 8 Stream Example: On the above output, we can see that there are several null values. We can filter null values by below solution. Filter null values : We can filter the null values …

    Read More »
  • 5 April

    Java 8 groupingBy Example

    In this tutorials, I am going to show you how to group a list of objects in Java 8. Java 8 groupingBy : groupingBy() is a static method available in java.util.stream.Collectors. Which is used to grouping the objects on the basic of any key and then it returns a Collector. …

    Read More »
  • 4 April

    Java 8 Read File Line By Line Example

    In this tutorials, I am going to show you how to read a File line by line using Java 8 Lambda Expressions. Read File Line By Line : Files is a class introduced in Java 7. This class consists exclusively of static methods that will work on files, directories, or …

    Read More »
  • 4 April

    User defined sorting with Java 8 Comparator

    In this tutorials, we are going to see how to sort user defined objects using Java 8 comparator with lambda expression. In the previous tutorials we have discussed about what is comparator in Java,  you can seen the basic functionality of the comparator in java here. Java 8 Comparator : …

    Read More »
  • 3 April

    How to Filter a Map in Java 8

    In this tutorials, we are going to filter a map in Java 8. We have been filtering the map in Java since over the years. But in previous versions of Java, if we want to filter a Map, we should loop the map and put condition in side the loop …

    Read More »
  • 3 April

    How to sort a Map using Java8

    I this  tutorials, I am going to show you how to sort a Map using Java 8 features. Sort a Map using Java8 : We can sort a map by two ways: Sort by key and value. Sort by key : Sort by Value :

    Read More »
  • 2 April

    How to convert List to Map in Java 8

    In this tutorials, we are going to learn how to convert List to Map in Java 8. Convert List to Map in Java 8 : We can convert the Java List<?> of objects into Map<k,v> in Java 8 via the Collectors class. The Collectors class provides a toMap() method to convert …

    Read More »
  • 2 April

    Java 8 How to convert Stream to List

    In this tutorials, we are going to learn how to convert stream to list in Java 8 Java 8 convert Stream to List : Java 8 provides a Collectors class to convert Stream to List. Collectors class is a final class, which is an implementation of Collector interface. The Collector …

    Read More »

March, 2017

  • 31 March

    Java 8 Stream Filter Example with Objects

    In this tutorials, we are going to show you how to filter a stream of objects in Java 8. We can filter the string values and as well as objects using the Java 8 Stream filter . Java 8 Stream Filter : The filter() in Java 8 is a method …

    Read More »
  • 30 March

    Java 8 foreach Example Tutorials

    In this tutorials, we are going to show how to use Java 8 foreach with lambda expressions. Usually we can use the foreach, while iterating the loops. Java 8 foreach : Java 8 introduced foreach as a method from Iterable interface, which performs the given action for the Iterable until …

    Read More »
  • 25 March

    Spring Boot Hibernate Integration Example

    In this tutorial, we are going to show you Spring Boot with Hibernate Example. The Spring Boot Hibernate integration is a crazy combination, since the hibernate have its own importance. Spring Boot Hibernate Integration : The technologies which are used for this example. Spring Boot Hibernate Project Structure : A …

    Read More »
  • 20 March

    Spring Boot JPA Integration Example

    In this tutorials, we are going to show you how to integrate Spring Boot with data JPA as  Spring Boot JPA Example. This includes how to integrate the simple spring boot application with Spring Data JPA. Spring Boot JPA Integration : Here we are going to use the below technologies: …

    Read More »