<a href="http://www.somethingfm.net/" target="_blank" rel="nofollow">somthingFM</a> BOOYAH
<a href="http://www.somethingfm.net/" target="_blank" rel="nofollow">somthingFM</a> BOOYAH
Originally posted by Campbell Ritchie:
Arrays.sort()? Can you apply it to an object? Apart from the fact that all arrays are objects in their own right . . .?
Please look up the details here: click on Arrays, then METHOD, then find sort(Object[]).
You will see that you can sort an array of Objects, but they have to be Comparable, which means they have to implement the interface of that name.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
For some reason computer science courses seem to think this is a useful skill.
Those things may be true. But in 25 years of professional business programming I have never encountered a situation where it mattered how data was sorted, nor have I ever had to write code to sort data. My opinion is that teaching sorting is the generals training the troops to fight the previous war.Originally posted by Chad Clites:
Perhaps it is because being able to analyze algorithm efficiency is quite useful (and in a nerdy sort of way, a fun exercise at times)? Because computer science is more than "how to program"?
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Do you have any actual evidence for that statement? Or are you just echoing received opinions? Personally I think it's the other way around. Better programmers can tell how things work without having to be taught. But I don't have any evidence for that either.Originally posted by Rusty Shackleford:
Knowing how different API libraries work underneath makes for a better programmer even if they never have to actually write them.
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |