Question: Need some assistance in java ASAP, Thanks in advance! Explore use of Comparable interface. Use Collections and/or Collection in the solution Apply generics to methods

Need some assistance in java ASAP, Thanks in advance!Need some assistance in java ASAP, Thanks in advance! Explore use ofComparable interface. Use Collections and/or Collection in the solution Apply generics tomethods using arrays. Apply generics to methods using List ADTs. Background readingZyBooks Chapters 11&12 Generic Methods Use of generic parameters gives us "type

Explore use of Comparable interface. Use Collections and/or Collection in the solution Apply generics to methods using arrays. Apply generics to methods using List ADTs. Background reading ZyBooks Chapters 11&12 Generic Methods Use of generic parameters gives us "type erasure," that is, the symbol E,'T. 'K, V (orwhichever may be used), is replaced at compile time with the data type indicated within diamond syntax. Generics can be applied to individual methods in addition to classes. In this lab, our methods, but not our class, will use generic parameters. Instructions for GenMethods.java Write a program GenMethods that has the following generic methods. (Also include a getldentificationString method again) (1) Write the following method that returns a new ArrayList. The new list contains the nonduplicate (i.e., distinct) elements from the original list. public static removeDuplicates (ArrayList list) (2) Write the following method that shuffles an ArrayList. It should do this specifically by swapping two indexes determined by the use of the random class (use Random rand = new Random( 340L) ; ), and it should do 30 of these swaps (this number was chosen arbitrarily by us for testing purposes) public static void shuffle (ArrayListcE> list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!