title: Best way to code a small Java 3d vector class
body: <p>Hi I am currently working on a little project and I have to add a class which allows me to add 2 vectors together / subtract them. 
  The Vector for example  is Vector ( x,y,z )</p>
  
  <p>What is the best way to code it? I do not want to use a class from the internet because I think the functionality I need is really basic.</p>
  
  <p>Here some Pseudo Code I was thinking about:
  The Vector (x,y,z) is a array with [0] = x, [1]=y [2]=z
  So If we have Vector1(x1,y1,z1) and Vector 2(x2,y2,z2), we simply have a 3d array which basically contains [0]=x1+x2 [1]=y1+y2 and [2]=z1+z2
  Is that the right way to go?</p>