Last active
November 24, 2019 21:41
-
-
Save guaracyalima/2e0fc41794cf834a7daf9f8f94c19669 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
E3 { | |
int number; | |
public E3 (int number){ | |
this.number = number; | |
} | |
int getNumber(){ | |
return this.number; | |
} | |
void setNumber(int number){ | |
this.number = number; | |
} | |
void addTree (E3 value){ | |
System.out.println("Valor incial" + value.getNumber()); | |
value.setNumber(value.getNumber() + 3); | |
System.out.println("Saida inicial " + value.getNumber()); | |
} | |
public static void main(String[] args) { | |
E3 e = new E3(1); | |
System.out.println("Primeira chamada " + e.getNumber()); | |
e.addTree(e); | |
System.out.println("Segunda chamada " + e.getNumber()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment