8Fermer10
squalylLe 24/02/2011 à 13:29
Zerosquare (./7) :
Pour les IsMachin(), il y a la méthode TryParse en .NET, j'imagine qu'il doit y avoir un équivalent en Java.


public EPIC isInt(string machin) {
    try {
        int result = Integer.decode(machin);
        return EPIC.WIN;
    } catch(NumberFormatException e) {
        return EPIC.FAIL;
    }
}