cs_lowang
Messages postés1Date d'inscriptiondimanche 23 mai 2004StatutMembreDernière intervention 5 mars 2005
-
5 mars 2005 à 13:09
cs_neodante
Messages postés2835Date d'inscriptionlundi 11 août 2003StatutModérateurDernière intervention16 décembre 2006
-
6 mars 2005 à 19:25
Bonjour a tous, voila mon problème:
j'ai construit une sous-classe de BigInteger, que j'ai nommé GrandIn
t:
import java.math.*;
class GrandInt extends BigInteger {
public GrandInt(String s){
super(s);
}
public GrandInt Calcul(){
GrandInt nb = new GrandInt("2");
nb = nb.add(nb); //la ça bugge!
return nb;
}
//...
}
voila donc je vous ai indiqué à quelle ligne ça bugge, le compilateur me met:
GrandInt.java:22: incompatible types
found : java.math.BigInteger
required: GrandInt
nb = nb.add(nb);
^
Je comprends pas, j'ai créé un objet de type grandint, et il est reconnu comme étant de type BigInteger...