Link Resource Belajar J2ME

Posted: April 22, 2010 in J2ME

Link untuk belajar J2ME :

  1. http://www.jasonlam604.com/v2/index.php?action=home
Coding Tips
The following tips are only suggestions and may or may not give gains in performance, it is to your own judgment and discretion to use them or not.
  1. Use StringBuffer instead of String because of the fact the String object can not be changed.  Any modification to a String variable is actually a new object creation.
  2. Using variables are more efficient then arrays.
  3. Counting down in loops is faster then counting up
  4. Try to use already built in methods, for example if you want to copy data from one array to another use System.arraycopy more then likely this method will be more efficient than the one you created yourself
  5. Remove constant calculations in loops
  6. Reuse objects
  7. Assign null to unused objects, especially unused threads
  8. Use compound operators like x += 1 instead o f x = x + 1 because fewer byte codes is generated
  9. Avoid synchronization in loops because there is an extra over head to lock and unlock each time the loop occurs.
  10. Accessing class variables directly is faster then using setter and getter methods

Sumber TIPS : J2ME & Gaming by Jason Lam

Advertisement
Comments
  1. Bowwow says:

    Pendatang baru ni Mas. Thx infonya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s