title: Error : onCreate(Bundle) is already defined in this activity
body: <p>Being new to Android Application development i was trying to learn connecting two activities using Intent. I tried a code from a book. It keeps throwing an error saying - 'onCreate(Bundle)' is already defined in MainActivity class as well as the NewActivity class. Would be of great help if i could get a solution.</p>
  
  <p>MainActivity.class</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.activity_new);
  
          View view = getWindow().getDecorView().findViewById(android.R.id.content);
          view.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent startIntent = new Intent(MainActivity.this, NewActivity.class);
                  startActivity(startIntent);
              }
          });
  
      }
  </code></pre>
  
  <p>NewActivity.class</p>
  
  <pre><code>public class NewActivity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.activity_new);
      }
  }
  </code></pre>