Created
August 30, 2017 00:44
-
-
Save robsonandradev/0b3a4e42f7b85bd6f81bbe0a95958993 to your computer and use it in GitHub Desktop.
Exemplo de encapsulamento
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
// Exemplo de encapsulamento | |
public class Div { | |
private int num; | |
public int getNum() { | |
return this.num; | |
} | |
public int setNum(int num) { | |
this.num = num; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment