This Notes is according to the udacity free course :
Android Development for Beginners
Lesson 3A : Object Oriented Programming
Output from a method
If you want to output from a method : return value is the key point.
Review



A method has a return data type
and there will need the return message
to return the value to the upper layer-----UI
The word write behind the return data can't be reachable because the declaration were done in "return message".
If there is no need to use return value, the method return data type is void.
Use Return Value

Define and Call a Method

The displayMessage Method - Quiz
First Step

Second Step

Android Development for Beginners
Lesson 3A : Object Oriented Programming
Output from a method
If you want to output from a method : return value is the key point.
Review



A method has a return data type
and there will need the return message
to return the value to the upper layer-----UI
The word write behind the return data can't be reachable because the declaration were done in "return message".
If there is no need to use return value, the method return data type is void.
Use Return Value

Define and Call a Method

The displayMessage Method - Quiz
First Step

Second Step

留言
張貼留言