I have two classes like firstactivity.java and secondactivity.java. In firstactivity I have a button(submit) when I click the button(submit) I want to pass the data of firstactivity.java to server. How can I do this?

Thanks in advance.