Skip to content

Instantly share code, notes, and snippets.

@Filmaluco
Created February 24, 2023 22:11
Show Gist options
  • Save Filmaluco/1a5fedf2e3c413d61a22058ee0dd3b6a to your computer and use it in GitHub Desktop.
Save Filmaluco/1a5fedf2e3c413d61a22058ee0dd3b6a to your computer and use it in GitHub Desktop.
public class ParInteiros {
private int i1, i2;
public ParInteiros(int i1, int i2) {
this.i1 = i1;
this.i2 = i2;
}
public int getI1() {
return i1;
}
public int getI2() {
return i2;
}
public int getSoma() {
return i1 + i2;
}
@Override
public String toString() {
return ("{" + i1 + ";" + i2 + "}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment