title: Expecting member declaration when I use if in Android Studio
body: <p>I've started learning Android.
  I can't use <code>if</code> in Kotlin because I saw this error
  Expecting member declaration
  can you help me ??</p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
      }
  
      var fixedIncome : Int = 50
      var tips : Int = 20
      var income : Int = fixedIncome + tips
  
      if(tips == 0){
          Log.d("tag", "You have not recieved any tips today")
      } else {
          Log.d("tag", "You have recieved some tips today")
      }
  }
  </code></pre>