Using Java, compose a generic static method print that printsthe elements of any object that implements the Iterable interface.Separate the elements with commas. Place your method into anappropriate utility class.
Expert Answer
Answer to Using Java, compose a generic static method print that prints the elements of any object that implements the Iterable in…