Skip to content

Instantly share code, notes, and snippets.

@dassiorleando
Created April 3, 2018 10:31
Show Gist options
  • Save dassiorleando/7a542625bacb823294e7a187b84e7d19 to your computer and use it in GitHub Desktop.
Save dassiorleando/7a542625bacb823294e7a187b84e7d19 to your computer and use it in GitHub Desktop.
public class ObjectA {
private String propA;
private ObjectB objectB1;
private ObjectB objectB2;
public ObjectA(String propA, ObjectB objectB1) {
this.propA = propA;
this.objectB1 = objectB1;
}
// Getters and setters
@Override
public String toString() {
return "ObjectA{" +
"propA='" + propA + '\'' +
", objectB1=" + Objects.toString(objectB1) +
", objectB2=" + Objects.toString(objectB2) +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment