Skip to content

Latest commit

 

History

History
61 lines (58 loc) · 2.4 KB

README.md

File metadata and controls

61 lines (58 loc) · 2.4 KB

New Way Of Learing Java 8 Streams

In this Repository we are giving you the best of best the implementations of streams in java 8, we are trying to show you how stream is similar to MySQL operation

Read similar

Topics Covers

  • lambda in java 8
  • Functional Interface
    • Predicate
    • Consumer
    • Function
    • Comparetor
    • Comparable and more
  • Streams
    • streams
    • map
    • filter
    • sotred
    • distinct
    • flatMap
    • IntStream.Of
    • IntStream.range
    • anyMatch
    • allMatch
    • noneMatch
    • sort
    • min
    • max
    • reduce
    • count
    • forEach
    • IntStream.rangeClosed
    • mapToObj ,mapToInt and more
  • Logically We are comparing all Stream operations to MYSQL Operations

Example

    select tid from transactions where city="hyd" (Logically Similar To) 
    allTransaction.stream()
                  .filter(p->p.getCity.equals("hyd"))
                  .map(Transactions::getTid)
                  .collect(Collectors.toList()); 

Questions cover

  • Find all transactions in the year 2011 and sort them by value (small to high).
  • What are all the unique cities where the traders work?
  • Find all traders from Nanded and sort them by name.
  • Return a string of all traders’ names sorted alphabetically.
  • Are any traders based in Osmanabad?
  • Print all transactions’ values from the traders living in Nanded.
  • What’s the highest value of all the transactions?
  • Find the transaction with the smallest value.

Database Design

Database Design