title: Java: Rectangles Width and Height
body: <p>When I draw a rectangle like the following </p>
  
  <pre><code>drawRect(0,0,39,39);
  </code></pre>
  
  <p>Is the width and height in pixels both 40? When I draw the rectangle over an image that i know is 40x40 pixels and put this rectangle right over it, it fits perfectly. So I am a bit confused because the java website says the the 3rd and 4th variable refer to width and height, but if this is the case it doesn't really refer to the real width, just the actual width-1. I feel like I am missing something or maybe making a mistake. S</p>