Code example for Formatter

Methods: formattoString

0
     
    private String getDateString(Calendar date){
        int d = date.get(Calendar.DATE);
        int m =date.get(Calendar.MONTH);
        int r = date.get(Calendar.YEAR);
        Formatter f = new Formatter();
        f.format("%2d.%2d.%d", d, m, r);
        return f.toString();
    } 
} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE