Below are the list of topics for Java 1.8 features
- Lambda Expression
- Functional Interface
- Anonymous Inner class v/s Lambda Expression
- Default and static methods
- Java 8 – default and static methods
- Pre-defined Functional Interface (1 argument)
1. Predicate
2. Function
3. Consumer
4. Supplier - Pre-defined Functional Interface (2 arguments)
1. BiPredicate
2. BiFunction
3. BiConsumer - Primitive Predicate Functional Interface
1. IntPredicate
2. LongPredicate
3. DoublePredicate - Primitive Function Functional Interface
1.1 IntFunction
1.2 LongFunction
1.3 DoubleFunction
2.1 ToIntFunction
2.2 ToLongFunction
2.3 ToDoubleFunction
3.1 IntToLongFunction
3.2 IntToDoubleFunction
3.3 LongToIntFunction
3.4 LongToDoubleFunction
3.5 DoubleToIntFunction
3.6 DoubleToLongFunction - Primitive BiFunction Functional Interface
1. ToIntBiFunction
2. ToLongBiFunction
2. ToDoubleBiFunction - Primitive Consumer Functional Interface
1.1 IntConsumer
1.2 LongConsumer
1.3 DoubleConsumer
2.1 ObjIntConsumer
2.2 ObjLongConsumer
2.3 ObjDoubleConsumer - Primitive Supplier Functional Interface
1. IntSupplier
2. LongSupplier
3. DoubleSupplier
4. BooleanSupplier - UnaryOperator Functional Interface and its primitive types
1. IntUnaryOperator
2. LongUnaryOperator
3. DoubleUnaryOperator - BinaryOperator Functional Interface and its primitive types
1. IntBinaryOperator
2. LongBinaryOperator
3. DoubleBinaryOperator - Method and Constructor references
- Stream API
1. How to create Stream
2. Stream filter() method with examples
3. Stream map() method with examples
4. Stream flapMap method with examples
5. Difference between map() and flatMap() in Stream API
6. Stream forEach() method with examples
7. Stream forEachOrdered() method
8. Stream sorted() method with examples
9. Stream count() method with examples
10. Stream distinct() method with examples
11. Stream min() and max() methods
12. Stream skip() and limit() methods
13. Stream peek() method with examples
14. Stream anyMatch() method with examples
15. Stream noneMatch() method with examples
16. Stream allMatch() method with examples
17. Stream findFirst() and findAny() methods
18. Stream collect() method with examples
19. Stream concat() method with examples
20. Stream toArray() method with examples
21. Stream reduce() method with examples
22. Stream mapToInt() method with examples
23. Stream mapToLong() method with examples
24. Stream mapToDouble() method with examples
25. Stream flatMapToInt() method with examples
26. Stream flatMapToLong() method with examples
27. Stream flatMapToDouble() method with examples - Optional Classes
- Date and Time API (JODA Time)
Java 8 Comparator – Sorting methods
- Java 8 – Comparator.naturalOrder() and Comparator.reverseOrder()
- Java 8 – reversed() method
- Java 8 – Comparator.comparing() method
- Java 8 – Comparator.comparing() method for custom/reverse sorting
- Java 8 – Comparator.comparingInt() method
- Java 8 – Comparator.comparingLong() method
- Java 8 – Comparator.comparingDouble() method
- Java 8 – Comparator.nullsFirst() and nullsLast() methods
- Java 8 – thenComparing() method (2-level attributes)
- Java 8 – thenComparing() method for custom/reverse sorting (2-level attributes)
- Java 8 – thenComparingInt() method (2-level attributes)
- Java 8 – thenComparingLong() method (2-level attributes)
- Java 8 – thenComparingDouble() method (2-level attributes)
Java 8 Comparator – Collection Sorting
- Java 8 – How to sort ArrayList elements
- Java 8 – Sorting List of primitive, String & Custom Objects
- Java 8 – Sorting ArrayList using sort() method of List
- Java 8 – How to sort LinkedList elements
- Java 8 – How to sort HashSet elements
- Java 8 – How to sort LinkedHashSet elements
- Java 8 – How to sort TreeSet in descending order
- Java 8 – How to sort List and Arrays with null values present
- Java 8 – How to sort Arrays in Ascending and Descending order ?
- Java 8 – Sorting list of objects on multiple fields (3-level attributes)
Java 8 Comparator – Map Sorting
- Java 8 – How to Sort HashMap Key-Value pairs by its Key in ascending & descending order
- Java 8 – How to Sort HashMap Key-Value pairs by its Value in ascending & descending order
- Java 8 – Sorting HashMap entries by its Key and Value
- Java 8 – How to Sort a Map entries by its Key – 6 ways
- Java 8 – How to Sort a Map entries by its Value – 6 ways
- Java 8 – How to sort LinkedHashMap entries by its Key in ascending/descending order ?
- Java 8 – How to sort LinkedHashMap entries by its Value in ascending/descending order ?
- Java 8 – How to sort TreeMap entries in descending order
Java 8 programs – Iterating Collection
- Different ways to iterate through List – 7 ways
- Various ways to iterate through ArrayList – 5 ways
- Iterating List using forEach() in Java 8
- Iterating Set using forEach() in Java 8
Java 8 programs – Iterating Arrays
Java 8 programs – Iterating Map
- Iterating Map using forEach() in Java 8
- Java 8 – Iterating HashMap in 8 ways
- Various ways to iterate through Hashtable – 6 ways
- Various ways to iterate over HashMap of ArrayList in Java
Java 8 programs – Removing duplicates
- Java 8 – How to find duplicate and its count in a Stream or List ?
- Java 8 – How to remove duplicates from ArrayList
- Java 8 – How to remove duplicates from LinkedList
- Java 8 – How to find duplicate and its count in an Arrays ?
- Java 8 – How to remove duplicate from Arrays ?
- Java 8 – Various ways to remove duplicate elements from Arrays
- Java 8 – How to remove an entry from HashMap by comparing keys
- Java 8 – How to remove an entry from HashMap by comparing values
Java 8 programs – Filtering
Java 8 programs – Merging
- Java 8 – Merging two or more Stream of elements
- Java – Merging 2 Arrays using List/Set approach
- Java – Concatenating 2 Arrays using Third Arrays approach
- Java 8 – How to Merge or Concatenate 2 Arrays using Stream API
Java 8 programs – Collection Conversion
- Java 8 – Conversion of Arrays to List
- Java 8 – Conversion of List to Map
- Java 8 – Conversion of Map to List
- Java 8 – How to convert HashMap to ArrayList
Java 8 programs – Stream Conversion
- Java 8 – Conversion of Stream to Arrays
- Java 8 – Conversion of Arrays to Stream
- Java 8 – Convert Stream to List
- Java 8 – Convert List to Stream
- Java 8 – Convert Stream to ArrayList
- Java 8 – Convert Stream to LinkedList
- Java 8 – Convert Stream to HashSet
- Java 8 – Convert Stream to LinkedHashSet
- Java 8 – Convert Stream to TreeSet
Java 8 programs – Map Conversion
- Java 8 – Convert Stream to HashMap
- Java 8 – Convert Stream to LinkedHashMap
- Java 8 – Convert Stream to TreeMap
- Java 8 – Convert Stream to ConcurrentHashMap
Java 8 programs – Miscellaneous
- Java features version-wise
- How to print Arrays elements
- Java: String join() method
- JDBC: An example to connect MS Access database in Java 8
Java 8 – Interview programs
- Java 8 – Find sum of Largest 2 numbers in an Arrays or List or Stream
- Java 8 – Find sum of Smallest 2 numbers in an Arrays or List or Stream
- Java 8 – Find sum and average of a List or ArrayList
- Java 8 – How to calculate sum and average of an Arrays ?
- Java 8 – Find First and Last elements in an Arrays
- Java 8 – Find First and Last elements in a List or ArrayList
- Java 8 – Find First and Last elements in a Set or HashSet
- Java 8 – Find First and Last entries in a Map or HashMap
Java 8 – Interview Question & Answers
Happy Coding !!
Happy Learning !!