how can i convert this code into android phone which have written in java?
<p>I want to convert this code to Android (for a phone) please guide me.  </p>

<pre><code>import javax.swing.*;

public class Irr {  
    public static void main(String[] args) {

        String s1=JOptionPane.showInputDialog(null,"Enter the value of i for +ve NPV without %       =");
        String snpv1=JOptionPane.showInputDialog(null,"Enter the +ve NPV=");
        String s2=JOptionPane.showInputDialog(null,"Enter the i for -VE NPV with out % =");
        String snpv2=JOptionPane.showInputDialog(null,"Enter the -ve npv with out - sign=");
        float i1=Float.parseFloat(s1);
        float npv1=Float.parseFloat(snpv1);
        float i2=Float.parseFloat(s2);
        float npv2=Float.parseFloat(snpv2);
        float i3= i1/100;  
        float npv4= (npv1/(npv1+npv2));     
        float i5=((i2-i1)/100);
        float irr=((i3+(npv4*i5))*100);
        System.out.println("Your IRR (internal rate of return) ="+irr+"%");  
    }
 }
</code></pre>
