how do i call java class methods to other java class file on android development
<p>i hav two classes...both classes are extends activity.. i need call other class method on main class on android development..its urgent..please.. i done something like subclass sub = new subclass()...its not work..</p>

<p>In 1st activity class</p>

<pre><code>package org.me.intent_testing;

import android.app.Activity; import android.os.Bundle; import android.widget.; import android.view.; import android.content.Intent;

/** * * @author pavankumar */

public class FirstActivity extends Activity {

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);

// Button orderButton = (Button)findViewById(R.id.order); Button orderButton = new Button(this); orderButton.setOnClickListener(new View.OnClickListener() {

  @Override
  public void onClick(View view) {
    Intent intent = new Intent(FirstActivity.this, secondActivity.class);
    startActivity(intent);
  }

});
} }

In secondActivity class

package org.me.intent_testing;

/** * * @author pavankumar */

import android.app.Activity; import android.os.Bundle; import android.widget.; import android.view.; import android.content.Intent;

public class secondActivity extends Activity {

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // setContentView(R.layout.order);

// Button orderButton = (Button) findViewById(R.id.end); Button orderButton = new Button(this); orderButton.setOnClickListener(new View.OnClickListener() {

  @Override
  public void onClick(View view) {
    finish();
  }

});
} }
</code></pre>

<p>In AndroidManifest.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.me.intent_testing"&gt;
    &lt;application&gt;
         &lt;activity android:name=".FirstActivity" android:label="FirstActivity"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN"/&gt;
                &lt;category android:name="android.intent.category.LAUNCHER"/&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
         &lt;activity android:name=".OrderScreen" /&gt;
    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>I hv problem to linking between two classes..</p>
