/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test.custom_datatype; import java.text.NumberFormat; import java.util.Locale; /** * * @author mr */ public class Money { public Money() { } @Override public String toString() { NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.FRANCE); return nf.format((float)(amount / 100)); } //////////////////////////////////////////// // JAVABEANS int amount = 0; public int getAmount() { return amount; } public void setAmount(int amount) { this.amount = amount; } }