How to Convert Long Data type to double data type in java?
<p>(isPlusClicked || op == '+'){</p>

<pre><code>                long result = 0;
                String finaldata = edt.getText().toString();
                finaldata = finaldata.replace("(", "");
                finaldata = finaldata.replace(")", "");
                System.out.println(" the string is now ==== "+edt.getText().toString());

                String[] total = finaldata.split("\\+");
                System.out.println(" *************** "+total[0] + "************** "+total[1]);
                System.out.println(" the index in the string array are ..... "+sb.toString());
                ArrayList&lt;String&gt; alvalue = new ArrayList&lt;String&gt;();

                System.out.println(" the splited number is ==== "+total[0] +" the second number is "+total[1]);

                StringBuilder sb1 = new StringBuilder(edt.getText().toString());

                int inc = 0;
                for(int i = 0;i&lt;sb1.length() ; i++){

                    char plus = sb1.charAt(i);


                    if(plus == '+'){

                        String[] totaly = finaldata.split("\\+| \\++ | \\+++");

                    if(inc&gt;=1){ 

                        System.out.println(" *******inc value with result is ***************** "+result+"?&amp;&amp;&amp;&amp;&amp;&amp; "+inc);    
                    result = result + Long.parseLong(totaly[inc+1]);

                    }else if(inc&lt;=0){
                        result =  Long.parseLong(totaly[inc]) + Long.parseLong(totaly[inc+1]);
                        //double myDouble = new Long(result).doubleValue();   
                        System.out.println(" Second value is---- ---- "+totaly[inc+1]);
                    }
                     inc = inc +1;
                    }
                    edt.setText("");
                    edt.setText( String.valueOf(result));
                }

            }   
</code></pre>

<p>when i am put the value in double
for example:
12345678+32164
than it's give me
ans:5.12377842E8
and when i am try to convert in Long than 122.81+212.122
it give the Zero(0) Answer 
so please tell me What m i do? for correct answer </p>
