Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
findByProductEntries_ProductIdIn() name actually just to add clarity for spring repository. the underscore (which is optional) adds clarity about product Id is present in child class.
well you can re size array if you want but at a time queue only can contain elements of the size passed in constructors. This is in the problem statement that u should be able to take n+1 element. However throwing exception on n+1 is something I did. What better you suggest then?