Question: in Java: say i have a Student class object with 3 String fields: a first name, a last name, and a student ID (although a

in Java:

say i have a Student class object with 3 String fields: a first name, a last name, and a student ID (although a string, studentID consists of numbers.)

i also have a Student array students[9] consisting of:

lastName firstName studentID

Dunn Sean 31111 Duong Geoffrey 29922 Fazekas Nicholas 31100 Prezioso Stefano 22223 Puvvada Mohana 11224 Ravikumar Rakhi 11226 Salyers Matthew 11227 Gillespie William 49587 Hess Caleb 29282

how can i write a method that will sort this array alphabetically/lexicographically, by firstName (or by lastName/studentID)?

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!