views:

88

answers:

1

Is there any way to create a BigInteger Method? I want to have a method of return type BigInteger.

A: 

I honestly don't know what you're trying to accomplish with this question, but you'd return a BigInteger the same way you return any other objects.

public BigInteger methodThatReturnsBigInteger() {
    BigInteger retVal = new BigInteger(...);

    return retVal;
}

Given the nature of the question, I'm not even sure if this is going to help, but there you go.

Jack Leow
while you're at it, a return type in the method signature might do good.
Alexander Sagen
-1; as Alexander said, this should be `public BigInteger methodName() {...}`
Lord Torgamus
Added return type to the signature, and countered -1 with a +1.
Andrei Fierbinteanu