I'm trying to sort objects based on the name. I don't know where Im going wrong. Code seems understandable and legal to me but keep on getting the error "The constructor SortMe.Man() is undefined" on top of New Man().
Mayu Mayooresan wrote: but keep on getting the error "The constructor SortMe.Man() is undefined" on top of New Man().
Basically, the compiler is complaining that you Man class doesn't have a constructor that takes no parameters. And if you take a quick look, your compiler is correct.
I made a empty constructor as below but now getting another error "No enclosing instance of type SortMe is accessible. Must qualify the allocation with an enclosing instance of type SortMe (e.g. x.new A() where x is an instance of SortMe)."
I removed the constructor so it'll use the default constructor. now getting this same error as above ( awwwwwwww