import java.util.Arrays;
//=================================================================================================
public class SortGuns {
//-------------------------------------------------------------------------------------------------
    public static void main(String[] args) {

        int index;
        ComparableGun[] myGuns = {
new ComparableGun("Ruger",12),
new ComparableGun("S&W",6),
new ComparableGun("Beretta",10)
        };

        System.out.print(" +++ ");
        for (index=0; index < myGuns.length; index++) {
            System.out.print(myGuns[index] + " +++ ");
        }
        System.out.println();
        Arrays.sort(myGuns);
        System.out.print(" +++ ");
        for (index=0; index < myGuns.length; index++) {
            System.out.print(myGuns[index] + " +++ ");
        }
        System.out.println();
    }
//-------------------------------------------------------------------------------------------------
}
//=================================================================================================
