title: Syntax error: java doesn't recognize a method
body: <p>I have imported all classes.</p>
  
  <p>Here at sendMessage i recieve the error: void is an invalid type of the variable sendMessage.</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      public void sendMessage(View view){
  
      }
  }
  </code></pre>