The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Re: octal escape sequences

Posted by Brian Sanders on November 29, 2001 at 4:27 PM

I've just started learning Java in school and in my textbook it says that octal escape sequences for char are '\nnn' where n = 0 to 377.
I've tested this and values over 377 did give me an error.
What I want to know is: why is the maximum octal value 377 and not 177777, like it should be?

This is purely for syntatical compatibility with C.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us