Write in Java please Write a complete recursive method from the… Write in Java please Write  a complete recursive method from the implemen

Write in Java please Write a complete recursive method from the… Write in Java please Write  a complete recursive method from the implementation perspective that will go inside the LinkedQueue class. The method will determine if a queue contains duplicate entries (two entries that are equal- logically equivalent) and next to each other (“consecutive”).The method header is:public boolean hasConsecutiveDuplicates()Notes:Having a recursive solution is worth 5 out of the 15 points.You can create a helper method. If you do, be sure to submit both your hasConsecutiveDuplicates() method and your helper method. Computer Science Engineering & Technology Java Programming Share QuestionEmailCopy link