I see all the debate about which code to use so here's my 2 cents worth.
I have been programming since the machine code days. My forte is speed.
I drifted away from assembly about 10 years ago because the compilers got
so good and the processors got more complicated.
I have just spent 6 months learning JAVA. It's ok but I miss pointers!
Have you ever tried to have 100 threads running in JAVA? It worked in
jdk1.3.1 but got slower in 1.3.1_03 and even slower in 1.4.0_01.
C++ is also ok but it does too many things that I didn't ask it to.
If you really want to know what your code is doing I like C.
Be aware that you can break the operating system with C by straying out
side of legal memory or by not unallocating reserved memory. All these
problems are solved with good code.
Of course if you don't care about a milli second here and there and you want
portability C++ or JAVA will do.
Whatever you're comfortable with.