title: What is binary compatibility in Java?
body: <p>I was reading <a href="https://rads.stackoverflow.com/amzn/click/com/0321356683" rel="noreferrer" rel="nofollow noreferrer">Effective Java</a> by Joshua Bloch.</p>
  
  <p>In Item 17: "Use interfaces only to define types", I came across the explanation where it is not advised  to use Interfaces for storing constants. I am putting the explanation below.</p>
  
  <p><strong><em>"Worse, it represents a commitment: if in a future release the class is modified so that it
  no longer needs to use the constants, it still must implement the interface to ensure binary
  compatibility."</em></strong></p>
  
  <p>What does binary compatibility mean here?</p>
  
  <p>Can someone guide me with an example in Java to show that code is binary compatible.</p>