Hi,
I have class of student object with the String student name and double GPA they are stored in array. My GUI have button for sort by name and sort by grade. I want to sort the name and the grade and I want to sort it using Comparator, but I don't know what is Comparator and when to use it. Also what is the diffrnet between Comparator and Comparable.
sk8ergirl 0 Newbie Poster
kumar.bhatia18 0 Newbie Poster
kumar.bhatia18 0 Newbie Poster
sepp2k 378 Practically a Master Poster
kumar.bhatia18 0 Newbie Poster
sk8ergirl 0 Newbie Poster
sk8ergirl 0 Newbie Poster
sepp2k 378 Practically a Master Poster
sk8ergirl 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.