[BAEL-4268]Different Serialization Approaches for Java (#10928)
* [BAEL-4268]Different Serialization Approaches for Java Code Changes * [BAEL-4268]Different Serialization Approaches for Java Code formatting changes * [BAEL-4268]Different Serialization Approaches for Java Added user proto file * [BAEL-4268]Different Serialization Approaches for Java updated pom.xml * [BAEL-4268]Different Serialization Approaches for Java Fixed indentation in pom.xml * [BAEL-4268]Different Serialization Approaches for Java Updated pom.xml * [BAEL-4268]Different Serialization Approaches for Java Fixed indentation in pom.xml Co-authored-by: MeenaGawande <MeenaGawande@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.baeldung.serialization.protocols;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User [id=" + id + ", name=" + name + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user