Java 8

  1. What java 8? What intention of java 8.
  2. Interfaces
    1. Default Method in Java Interface
    2. Static Methods in Java Interfaces
    3. Other changes for interface in java 8
  3. Lambda Expressions
    1. Basics of Lambda Expressions
    2. Questions on Lamda Expressions
    3. Daily Uses of Lambda Expression
    4. Functional Interfaces and its types
      1. Java 8 Predicate Interfaces (always returns true or false)
      2. Java 8 Supplier Interfaces (no input and only output)
      3. Java 8 Consumer Interfaces (only input and no output)
      4. Java 8 Functions Interfaces (any input and any output)
      5. Java 8 UnitaryOperator Interfaces (one input and same type as output)
      6. Java 8 BinaryOperator Interfaces (two input and same type as output)
    5. Methods Reference and Constructor Reference
    6. Exception handling using wrapper lamda
    7. Calculating execution time of program in java 8
    8. Passing lambda as method parameter
  4. New Patterns in Java 8
    1. Null check using Objects.requiredNonNull
    2. Equals check using predicate (Predicate.isEqual(target))
    3. Predicate instead of if else in java (Predicate and())
    4. Iterating in one line using forEach
    5. Using Lambda instead of anonymous inner class
    6. Using Lambda as wrapper (Example : Exception handling)
    7. Chaining of consumers
    8. Explore all the methods of Supplier, Consumer, Predicate and Functions
    9. Explore Hacks in java 8
  5. Java Streams (Mock Data)
    1. Stream in Java 8
    2. Optional class
    3. Intermediate Methods
      1. Filter method of the Stream class
      2. map method of Stream class
      3. flatMap method of Stream class
      4. sorted method of Stream class
      5. distinct method of Stream class
      6. limit method of Stream class
      7. skip method of Stream class
      8. peek method of Stream class
    4. Terminal Method
      1. ForEach method of the Stream class
      2. Collect method of the Stream class
      3. reduce method of Stream class (sum/count/avergae is pending)
      4. count method of Stream class
      5. match method of Stream class (allMatch,anyMatch,noneMatch)
      6. min and max method of Stream class
      7. toArray method of Stream class
    5. Shortcircuit method of Stream class
      1. findAny and findFirst method of the Stream class
      2. anyMatch()
    6. Static Methods of Stream class
      1. builder()
      2. empty()
      3. of()
      4. of()
      5. iterate
      6. generate
      7. concat
    7. Other methods still to be determined
      1. of method of Stream class
      2. Stream Vs Parallel Stream
      3. Filtering and Transformation
      4. Grouping data with streams like SQL
      5. Joining Strings
  6. Collectors class
    1. To List
    2. To Set
    3. To Map
    4. To Collection
    5. joining method of collectors class
    6. summarize & stat
    7. averagingInt, summingInt and summarizingInt method of collectors class
    8. groupingBy , partitioningBy methods of Collectors
    9. collectingAndThen method of Collectors
  7. Date and Time API
  8. Steam + Map object

Questions :

  • Why are stream immutable
  • Stream Vs Collection
  • Different ways to create stream
  • How to convert Stream to Array using toArray method of Java 8 Stream?
  • How to prove Java 8 Stream is lazy?
  • What will happen if we call terminal operation more than one time? 
  • Base Interfaces of java 8 Stream
  • Parallel vs Sequential Stream
  • Whether we can reuse the Stream or not? 
  • How Parallel Stream works?
  • What are the core stream operations of Java 8 Stream?
  • What are the Key-points of Java 8 Stream? 

Reference :