Re: Java Fibonacci number generator
It's an object.
A simple toString() should do it.
Then print out the string.
~Squeek
Originally posted by gerbi7
A simple toString() should do it.
Then print out the string.
toString
public String toString()
Returns the decimal String representation of this BigInteger. The digit-to-character mapping provided by Character.forDigit is used, and a minus sign is prepended if appropriate. (This representation is compatible with the (String) constructor, and allows for String concatenation with Java's + operator.)
Overrides:
toString in class Object
Returns:
decimal String representation of this BigInteger.
See Also:
Character.forDigit(int, int), BigInteger(java.lang.String)
public String toString()
Returns the decimal String representation of this BigInteger. The digit-to-character mapping provided by Character.forDigit is used, and a minus sign is prepended if appropriate. (This representation is compatible with the (String) constructor, and allows for String concatenation with Java's + operator.)
Overrides:
toString in class Object
Returns:
decimal String representation of this BigInteger.
See Also:
Character.forDigit(int, int), BigInteger(java.lang.String)

Comment