java - class cannot be resolved to a type -


I want to write a comparative class so that I can later sort the list of elements using this comparator, but I Error. Code looks like this:

  class alam {public string user_name; Public string_name; Public string getGivenName () {return given_name; }} Compare Class Tools Compare & lt; Elem & gt; {Comparison of Public Entry (Alem O1, Alem O2) {Return O1.getGivenName (). Compare (o2.getGivenName ()); }}  

This gives me an error:

Eelam can not be sorted in any way

I is not sure how I can fix this error.

This means that the compiler can not find the class Elem .

Do not forget to import it at the top of your Java class, if Elem is in a different package.

Also make sure you do not have a typo.


Comments