title: Syntax error on token "boolean", invalid Expression
body: <p>-I am encountering "Syntax error on token "boolean", invalid Expression" error in if/else part or the code below . Am getting this error 3 times on all "else/if" lines.</p>
  
  <p>-Another error I am getting is on the last "else" that i have to insert a ";" after the statement which is not resolving anything.</p>
  
  <pre><code>package com.dey2929.bmihealth;
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.view.Menu;
  import android.widget.TextView;
  
  public class ResultActivity extends Activity {
  TextView result;
  TextView review;
      @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_result);
      result = (TextView) findViewById(R.id.tvmybmi);
      review = (TextView) findViewById(R.id.review);
       Intent intent = getIntent();
       String YourBmi = intent.getStringExtra("YourBmi");
       result.setText(" Your BMI is: " + YourBmi);
        if (boolean.valueof(YourBmi) &lt;= 18.0)
        {
            review.setText("You are Underweight ");
  
        }
        else if ((boolean.valueof(YourBmi) &gt; 18.0 &amp;&amp; boolean.valueof(YourBmi) &lt; 25.0 ))
        {
            review.setText("You are Normal (healthy weight) ");
        }
        else ((boolean.valueof(YourBmi)) &gt; 25.0)
        {
            review.setText("You are Overweight");
        }
  
  
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.result, menu);
      return true;
  }
  @Override
  protected void onPause() {
      super.onPause();
      finish();
  }
  
  }
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>EDIT- Error only in the last else line is left i.e. </p>
  
  <blockquote>
    <ul>
    <li>The left-hand side of an assignment must be a variable
    -Syntax error, insert ";" to complete Statement
    <ul>
    <li>Insert assignment operator expression to complete assignment.</li>
    </ul></li>
    </ul>
  </blockquote>
  
  <p>modified code :</p>
  
  <pre><code>package com.dey2929.bmihealth;
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.view.Menu;
  import android.widget.TextView;
  
  public class ResultActivity extends Activity {
  TextView result;
  TextView review;
      @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_result);
      result = (TextView) findViewById(R.id.tvmybmi);
      review = (TextView) findViewById(R.id.review);
       Intent intent = getIntent();
       String YourBmi = intent.getStringExtra("YourBmi");
       result.setText(" Your BMI is: " + YourBmi);
        if (Float.parseFloat(YourBmi) &lt;= 18.0)
        {
            review.setText("You are Underweight ");
  
        }
        else if ((Float.parseFloat(YourBmi) &gt; 18.0 &amp;&amp; Float.parseFloat(YourBmi) &lt; 25.0 ))
        {
            review.setText("You are Normal (healthy weight) ");
        }
        else (Float.parseFloat(YourBmi) &gt; 25.0)
        {
            review.setText("You are Overweight");
        }
  
  
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.result, menu);
      return true;
  }
  @Override
  protected void onPause() {
      super.onPause();
      finish();
  }
  
  }
  </code></pre>