Last active
January 10, 2018 19:32
-
-
Save seupedro/6cef72997d6ba33f105c4a5cf1e65dbc to your computer and use it in GitHub Desktop.
Modificador de Acesso - Access Modifier Android
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 Carro { | |
private int mModelo; | |
public Carro() { | |
mModelo = 0; | |
setup(); | |
} | |
public Carro(int modelo) { | |
mModelo = modelo; | |
config(); | |
} | |
private void config() { | |
String mensagem = "Crie um carro do modelo: " + mModelo + "."; | |
Toast toast = Toast.makeText(this, message, Toast.LENGTH_SHORT); | |
toast.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment