error when returning a value of type Double?
<p>In this method I return a value of the type Double, but there is an error saying "Method </p>

<p>Must return value of type Double"???</p>

<p><strong>Code</strong>:</p>

<pre><code>public class Gyro extends Activity {

Double gyro_X;
Double gyro_Y;
Double gyro_Z;

public Double getGyro_X() {
    if (this.gyro_X == null) {
        Toast.makeText(this, ""+gyro_XIsNullText, ToastdurationShort).show();
    } else { 
    return this.gyro_X;
    }
}
</code></pre>
