This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes padding space in update code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "padding space in update code" Watch "padding space in update code" New topic
Author

padding space in update code

Tim Fernandez
Ranch Hand

Joined: Aug 31, 2005
Posts: 65
Hi All,

Ive seen some codes in some posts about writing padded Strings to the db file and most of them use the System.arraycopy.. Now im worried that my code below is not efficient as compared to the others. Is my code ok?
Christian P�cher
Greenhorn

Joined: Sep 04, 2005
Posts: 8
Well, I understood the code within 30 secs and when you write documentation for the method, I would have been even faster. My assignment - as well as my experience - says you should prefer clarity over minor speed improvments. The code is readable, so it is ok. If you are really concerned about speed, I would take a profiler and fix hotspots first.

HTH, chris
Tim Fernandez
Ranch Hand

Joined: Aug 31, 2005
Posts: 65
more readable than this?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: padding space in update code