f******g 发帖数: 423 | 1 The following is a class I wrote.
It is a child of the class java.math.BigInteger
*************************************
// class better.java
import java.math.BigInteger;
import java.util.Random;
public class Better extends BigInteger
{
String str;
public Better(short s) {
}
public Better(int i) {
}
public Better(long l) {
}
public Better(Short S) {
}
public Better(Integer I) {
}
public Better(Long L) {
}
}
******* | g*****g 发帖数: 34805 | 2
Do something like below for each constructor, I am too lazy to
explain. By the way, I would only keep Better(long) if I were you.
super(new Short(s).toString());
【在 f******g 的大作中提到】 : The following is a class I wrote. : It is a child of the class java.math.BigInteger : ************************************* : // class better.java : import java.math.BigInteger; : import java.util.Random; : public class Better extends BigInteger : { : String str; : public Better(short s) {
|
|