BEAN下
public double convert(double amount) {
return amount*8;
}
测试BEAN下
public static void main(String[] args) {
CurrencyConverterTestClient1 client = new CurrencyConverterTestClient1();
CurrencyConverterHome home=client.getHome();
CurrencyConverter converter=null;
try {
converter = home.create();
System.out.println("450.50美圆转换人民币是: " + converter.convert(450.50) + "元");
} catch (Exception ex) {
System.out.println("错误...");
ex.printStackTrace();
}
}