Factorizing integers
Even if looping from 2 to sqrt(number) is an optimization as suggested by palacsint, you would run better by looping as long as number &gt; 1:

for (int i = 2; number &gt; 1; i++) {
    ...
}


Since you are only working on relatively small numbers (Integer.MAX_VALUE or less), you should also consider using a prime number table instead of trying each and every divisor from 2 to sqrt(number). There are roughly 4.800 prime numbers less than sqrt(Integer.MAX_VALUE), which cover all possible factors. Keeping them in an array of ints and testing only those numbers as possible factors should also gain some performance.

Better factorizing algorithms than this brute force approach are not known.