// as you can see in the method getCurrency l have threestrings respectively t,s
ID: 3615082 • Letter: #
Question
// as you can see in the method getCurrency l have threestrings respectively t,s and a. I would like to know how can lreturn them in the main method and print them out after lhave formatted them.import javax.swing.*;
import java.text.DecimalFormat;
import java.text.NumberFormat;
public class currency
{
public static void main(String args[])
{
double total = 6;
double sum= 5;
double amount = 17.0;
String callCurrency=getCurrency(total,sum,amount);
}
public static String getCurrency ( double total,double sum, double amount)
{
NumberFormat formatter = newDecimalFormat("$0.00");
String t = formatter.format(total);
String s= formatter.format(sum);
String a = formatter.format(amount);
}
}