DecimalFormat df = new DecimalFormat("#0.##"); df.getDecimalFormatSymbols().setDecimalSeparator('.');
DecimalFormat df =new DecimalFormat("#0.##"); DecimalFormatSymbols decimalFormatSymbols = df.getDecimalFormatSymbols(); decimalFormatSymbols.setDecimalSeparator('.'); df.setDecimalFormatSymbols(decimalFormatSymbols);
    private String getNewStudentMark(ISuportePersistente sp, DistributedTest dt, Student s) throws ExcepcaoPersistencia {        double totalMark = 0;        List<StudentTestQuestion> studentTestQuestionList = sp.getIPersistentStudentTestQuestion().readByStudentAndDistributedTest(                s.getIdInternal(), dt.getIdInternal());        for (StudentTestQuestion studentTestQuestion : studentTestQuestionList) {            totalMark += studentTestQuestion.getTestQuestionMark().doubleValue();        }        DecimalFormat df = new DecimalFormat("#0.##");        df.getDecimalFormatSymbols().setDecimalSeparator('.');        return (df.format(Math.max(0, totalMark)));    }