October 2017
Beginner
318 pages
7h 26m
English
Your standard Java method also has one more keyword before we actually give it a name, and that is the type of information this method is going to return:
public static float fToC()
{
}
For example, we would like to be able to call fToC on our Kelvin to Fahrenheit function. When we do this, we're basically treating the result of our Kelvin to Fahrenheit function as a floating-point variable of its own. This is a good sign that the return type we're looking for in these functions is a float data type. What this means is when these little programs finish executing, they're going to throw out a floating-point value to our main method, which called them. After we name a function, we follow it with two ...
Read now
Unlock full access