title: Should serialVersionUID be unique for different classes?
body: <pre><code>class A implements Serializable{
      private static final long serialVersionUID = 5L;
      ...
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>class B implements Serializable{
      private static final long serialVersionUID = 6L;
      ...
  }
  </code></pre>
  
  <p>then it is necessary to give unique <code>serialVersionUID</code> to both classes.</p>
  
  <p>So can I assign <code>serialVersionUID = 5L</code> for both classes?  </p>
  
  <p>I read following links</p>
  
  <p><a href="https://stackoverflow.com/q/888335/3131537">Why generate long serialVersionUID instead of a simple 1L?</a></p>
  
  <p><a href="https://stackoverflow.com/q/285793/3131537">What is a serialVersionUID and why should I use it?</a></p>