wood burning stoves 2.0
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes unicode?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "unicode??" Watch "unicode??" New topic


srikanth reddy
Ranch Hand

Joined: Jul 28, 2005
Posts: 252
1.4) Which one of the following are not valid character contants? [8]
Select any two.
(a)char c = '\u00001' ;
(b)char c = '\101';
(c)char c = 65;
(d)char c = '\1001' ;

here the values in option b and d are taken to be octal values ..how is it so??octal values should start with 0 ..right ...

please help


Thanks & Regards<br /> <br />-Srikanth
Kris Krason

Joined: Aug 05, 2005
Posts: 25
In char values, it is not needed to have 0 in front of octal.
Every backslash with one, two, three is considered an octal value of char.

Here's a link to JLS

As you may see, octal digits can be in this form :


Kris Krason<br />SCJP1.4 (96%)<br />SCJP1.5 (91%)<br /> <br />See my <a href="http://krisreviews.com/2006/12/code-complete-second-edition/" target="_blank" rel="nofollow">Code Complete review</a><br /> <br /><a href="http://www.coderookie.com/2006/tutorial/the-pseudocode-programming-process/" target="_blank" rel="nofollow">Pseudocode Programming Process</a>
I agree. Here's the link: http://aspose.com/file-tools
subject: unicode??
It's not a secret anymore!