This is a JAVA 8 application that finds orders that contains top 2 frequently ordered items across all the orders.
In this application , items and order lists are manually created and top two frequent items are filtered out using the stream API and lambda functions.
Output of the application on live run.
item2--> usageCount:3;corresponding Orders: Order1 Order3 Order4
item1--> usageCount:2;corresponding Orders: Order1 Order4