aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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?

 
 
subject: padding space in update code