Created
February 22, 2024 20:19
-
-
Save alexjosesilva/d8f4f406da29d8c6ae00c541de0900b9 to your computer and use it in GitHub Desktop.
Encapsulamento
This file contains hidden or 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 EncapsulationExample { | |
private int data; | |
public int getData() { | |
return data; | |
} | |
public void setData(int data) { | |
this.data = data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment