Created
February 24, 2023 22:11
-
-
Save Filmaluco/1a5fedf2e3c413d61a22058ee0dd3b6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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