Convert to string - Java Quiz Question


Write a program to convert given input to string.

Input (Double) Output (String)
786 '786.0'
545.00 '545.0'
10 '10.0'
1.0 '1.0'



class ConvertToString
{
    public static void main(String s[])
    {
        System.out.println("Converted string is : " + convertToString(786));

    }


    public static String convertToString(double input) {
    }

}