File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 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="" target="_blank" rel="nofollow">Code Complete review</a><br /> <br /><a href="" target="_blank" rel="nofollow">Pseudocode Programming Process</a>
I agree. Here's the link:
subject: unicode??
jQuery in Action, 3rd edition