Student[] values = { new Student("Tom", 87),
new Student("Cindy", 100),
new Student("Pat", 75),
new Student("Anne", 92),
new Student("Matt", 82)};
Shouldn't that be a 2D array?
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
1) the result of your comparison is thrown away as soon as you exit your findSmallest method, so you might as well not have run that method in the first place.
2) Java doesn't have operator overloading so you can't use mathematical operators on class instances. Your class is obviously longer than the bit you posted and the error in another part you didn't show.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
No it isn't the names are in quotations.
I don't know what I was thinking. I swear I saw curly braces instead of parenthesis.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20