This is very C-style programming.  Instead of vector 0, 1, 2, 3, etc. use clear symbolic names in Java.