Re: Is there a better way to do this?
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Jul 2007 08:08:57 GMT
On 28 Jul 2007 01:02:55 GMT, John <jtlinux1@xxxxxxxx> wrote, quoted or
indirectly quoted someone who said :
Anyway, here's a link to my code. I'd appreciate any comments or critisim. I think it's a good first attempt, but it's not something I'd want to turn in to a professor, yet.
http://sparklesthecat.is-a-geek.com/code/Hello.java
ArrayLists are for when you don't know in advance how many elements
you will have. Arrays are for when you do. If you flip your code
from ArrayList to Array you will see it becomes much more readable and
faster.
Not to worry about the loss of Collections.sort. See Arrays.sort.
See http://mindprod.com/jgloss/sort.html
also try to convert any FOR to for:each.. That greatly enhances
readability.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.
- Follow-Ups:
- References:
- Is there a better way to do this?
- From: John
- Is there a better way to do this?
- Prev by Date: Re: [JNLP]trying to install a jnlp app on a web server
- Next by Date: Re: [List handling]number of occurences
- Previous by thread: Is there a better way to do this?
- Next by thread: Re: Is there a better way to do this?
- Index(es):
Relevant Pages
|