Generic list of lists Java -


I'm trying to create a generic function in Java to know the maximum likeness between a list from ArrayList and ArrayList.

P> List of ARL Listings

  Public stable and maximum-equivalency (Arrayist & lieutenant;? & Gt; Arrielist & LT; Arrest & quot ;? & gt; & gt; Group) {int maxSim = 0; (Arrayist & lt ;? & gt; g2: group) {int sim = equality (G, (arrelist & lt ;? & gt; g2); if (sim> maxsim) maxSim = sim;} return maxSim ;}  

However, when I try to call it in my main function, it shows an inconsistent error

  ArrayList & lt; ArrayList  

I can not understand

>

& gt; & lt; Points & gt; & gt; ArrayList & lt ;? & gt; I've been representing all the items - signals Apart from this, it works between two array lists in my similarity functions:

  Public static equality (ArrayList & lt;? & Gt; g1, ArrayList & lt;? & Gt; G2) {int total = 0; for (object o1: g1) {object o 2: g2} {if (o1.equals (o2)) total ++;}} total return;}  

Announce a common value instead of wildcard:

  public & Lt; T & gt; Static Maximum Maximizer (list & lt; T & gt; G, list & lt;? Extension in the list & lt; T & gt; & Gt; GS);  

Comments