Code Monkey home page Code Monkey logo

java8_introtostreams's Introduction

Code repository for Training JSE8 - Intro to Streams


Exercises:

Basic stream (Jse8_streams/src/main/java/part1/basic/exercises):

  • Implement commented TODO lines at Sample1A_StreamBasicExercise.java using streams.
  • Implement commented TODO lines at Sample1B_TraversingExercise.java using streams.

Generators (Jse8_streams/src/main/java/part2/generators/exercises):

  • Implement commented TODO lines at GeneratorExercise.java using streams.

Filtering (Jse8_streams/src/main/java/part3/filtering/exercises):

  • Given FileManagerExercise.java class, implement using streams, read the lines at data.txt file and count how many are different ignoring the first line. Also, count how many lines are different ignoring those lines starting with ‘==‘.
  • Given FileManagerExercise.java class, implement using streams and filter, read the lines at data.txt file and print them out ordered in ascending and descending order.
  • Given FileManagerExercise.java class, implement using streams, read the lines at data.txt file and count how many words are in each line. Also show the line and the count of words in the line using peek functionality.

Collect(Jse8_streams/src/main/java/part4):

  • Given the list at TransactionManagerExercise.java class, print the name of the traders. Also print the unique names sorted adding values to a TreeSet.
  • Given the list at TransactionManagerExercise.java class, print the unique (grouping) name of the traders and the sum of total amounts. Also print the unique names within the years when they have transactions in a new line.
  • Read the lines at data.txt file and verify all lines contains the text ‘lazy’.
  • Read the lines at data.txt file and print the first line which contains the text ‘cat’.
  • Given the list at TransactionManagerExercise.java class, print the transaction with the highest amount.
  • Given the list at TransactionManagerExercise.java class, print the transaction with the sum of all amounts within the last year of transaction.

Optional (Jse8_streams/src/main/java/part5/exercises):

  • Avoid possible NullPointerExceptions errors adding a method getNullSafeValue using Optional API in the OptionalExercise.java.

Query like practice (Jse8_streams/src/main/java/part9/exercises):

  • Follow the comments to complete the QueriesLikeExercises.java file practicing streams.

java8_introtostreams's People

Contributors

aohz avatar

Watchers

James Cloos avatar Jose Luis Villaverde Balsa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.