Question: Java language. Thanks in advance a Given below is a class Bottle that has attributes material and size. Your task is to rewrite the code

Java language. Thanks in advance
a Given below is a class Bottle that has attributes material and size. Your task is to rewrite the code so that it implements the Comparable interface. The ordering is based on material only. public class Bottle implements Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
