octal number can have upto 21 digits. How? I didnt understand.... 000 to 377 is the range right? and the maximum digit for integer is 2137483467, that is 10 digits... then how come octal can have upto 21 digits.
Binary can have 2 digits: zero and one Octal can have up to 8 digits in each position. (0 - 7) Decimal can have up to 10 digits in each position. (1 - 9) Hexadecimal can have up to 16 digits in each position. (0 - F)
The maximum size for an int (in decimal form) is about 2 million. In hexadecimal that would be 7FFFFFFF. However a max long in hexadecimal would be 7FFFFFFFFFFFFFFF.
In other words, an octal number can be created that is infinitely long. However if you're talking about how many octal digits there could possibly be in an int, that's a different question. Can you clarify what you mean by "000 to 377 is the range right?" The range of what? [ February 09, 2006: Message edited by: Marilyn de Queiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop