Wednesday, April 3, 2019

New features in java 8

Q- What are the new features in java 8?
Answer : 
  • Java Time API
  • Lambda expressions 
  • Functional interfaces
    • Built-in Functional Interfaces in Java
      • Function
      • Predicate
      • UnaryOperator
      • BinaryOperator
      • Supplier
      • Consumer
    • Java Functional Composition
      • Predicate Composition
        • and()
        • or()
      • Function Composition
        • compose()
        • andThen()
  • Method references: Java 8 provide new features this is used to refer functional interface methods using " :: " operator. see method reference examples.
  • Stream API : Java Stream API for Bulk Data Operations on Collections  Stream API Examples
    • Non-Terminal Operations or internal Operations
      • filter()
      • map()
      • concat()
      • flatMap()
      • distinct()
      • sorted()
      • limit()
      • peek()
    • Terminal Operations
      • anyMatch()
      • allMatch()
      • noneMatch()
      • collect()
      • count()
      • findAny()
      • findFirst()
      • forEach()
      • min()
      • max()
      • reduce()
      • toArray()
  • Default methods and Static methods in interface,
  • Base64 Encode Decode,
  • Optional class,
  • Collectors class : Collection API improvements
  • ForEach() method : forEach() method in Iterable interface
  • Parallel Array Sorting: Arrays.parallelSort()
  • Nashorn JavaScript Engine,
  • StringJoiner Class
  • Type and Repating Annotations,
  • IO Enhancements,
  • Concurrency Enhancements : Concurrency API improvements
  • JDBC Enhancements etc.
  • Miscellaneous Core API improvements
Q - CompletableFuture in Java?

Q- ExecutorCompletionService ?

Q- Future vs CompletableFuture?

Q- StampedLock was introduced in Java 8.
Answer :
Q- What is Predicate and Apply in java 8?

Q- What are the changes in HashMap in java 8?
                                    OR
Q- Performance Improvement for HashMap in Java 8?
Answer:

Q- What are the changes in comparator in java 8?
Answer:
Q- External iterator vs Internal iterator?
Q- Spliterator vs Iterator in java?

Related Tutorial

No comments:

Post a Comment