title: Does final method in Java save memory?
body: <p>In C++ virtual member functions are part of the class and make the object bigger as the object has to keep a pointer to its functions (base or overriden). If I'm in Java and I want to make an object with the smallest size, will making the methods final prevent the class from holding pointers to the methods and overall reduce the size of my objects of this class? Is it also true for private methods?</p>
  
  <pre><code>class Small {
      float x;
  
      final float getX() {
          return x;
      }
  
      final void setX(float x) {
          this.x = x;
      }
  }
  </code></pre>