-
-
Save alamrizy/bbff77cf4599dbae3294050328c4ed91 to your computer and use it in GitHub Desktop.
Android Development for Beginners : Define a Method
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
/** | |
* Get the email account name. | |
* | |
* @return the name of the account. | |
*/ | |
private String getAccountName() { | |
return "[email protected]"; | |
return "[email protected]"; | |
} |
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
/** | |
* Add $4 of tip onto the current bill. | |
* | |
* @return the total price of the bill (including tip). | |
*/ | |
private addTip(int bill) { | |
return bill + 4; | |
} |
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
/** | |
* Sets up the app for the current city. | |
*/ | |
private nothing setup() { | |
cityName = "London"; | |
} |
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
/** | |
* Get the number of students in a class. | |
* | |
* @return the number of students. | |
*/ | |
private int getStudentClassSize() { | |
return "20"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment