Something to think about: DO NOT overuse String, for example in a huge loop.
This will create a lot of String objects that have to be GC'ed.
The "Bad coding" example will produce 2 string objects every loop. Next example will produce only one final String and a single stringbuilder. This makes a huge difference when optimizing huge loops for speed. I used stringbuilder a lot when making my Wordlist Pro Android app, and it got really speedy when going through 270000 words in no time.
//Bad coding:
String s = "";
for(int i=0;i<999999;i++){
s = "Number=";
s = s + i;
System.out.println(s);
}
//Better coding
final String txt = "Number=";
StringBuilder sb = new StringBuilder();
for(int i=0;i < 999999;i++){
sb.setLength(0);
sb.append(txt);
sb.append(i);
System.out.println(sb);
}
I wrote a more extended blogpost about the matter.
read here