title: Why do POJO classes need to implement the Serializable interface?
body: <p>Why do POJO Java classes have to implement the <code>Serializable</code> interface? What will happen if I do not implement <code>Serializable</code>?</p>
  
  <pre><code>@Entity
  @Table(name="Customer")
  public class Customer implements Serializable {
  
      private static final long serialVersionUID = -5294188737237640015L;
      /**
       * Holds Customer id of the customer
       */
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name = "cust_id")
      private int Custid;
  
      /** Holds first Name of the customer*/
      @Column(name = "first_name")
      private String firstName;
  
      /** Holds last Name of the customer */
      @Column(name = "last_name")
      private String lastName;
  
      /** Holds Customer mobile number of customer*/
      @Column(name = "cust_mobile")
      private long MobileNo;
  
      /**Holds customer address of customer*/
      @Column(name = "cust_address")
  </code></pre>