wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes IS such TYPE OF QUESTION ASKED IN SCJP REAL EXAM  :(( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "IS such TYPE OF QUESTION ASKED IN SCJP REAL EXAM  :((" Watch "IS such TYPE OF QUESTION ASKED IN SCJP REAL EXAM  :((" New topic
Author

IS such TYPE OF QUESTION ASKED IN SCJP REAL EXAM :((

Karu Raj
Ranch Hand

Joined: Aug 31, 2005
Posts: 479
public class TechnoSample {
public static void main(String[] args) {
String s = "\u0048ello\u000aWorld!";
System.out.println(s);
}
}
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

You should know the acceptable range of Unicode values (so that you can recognize whether they're valid), but you should not be expected to translate these into chars.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Thomas De Vos
stable boy
Ranch Hand

Joined: Apr 12, 2003
Posts: 425
You need to understand that during compilation the Unicode characters are transformed to their ASCII representation and therefore can cause compilation errors.

Example:

It is illegal to write: '\u000a' // This is the Line Feed character
[ December 23, 2005: Message edited by: Thomas De Vos ]

Try your free <a href="http://www.javacertificate.com" target="_blank" rel="nofollow">SCJP 1.4</a> certification centre.<br />Try your free <a href="http://www.j2eecertificate.com" target="_blank" rel="nofollow">SCWCD</a> certification centre.<br />Try your free <a href="http://www.ejbcertificate.com" target="_blank" rel="nofollow">SCBCD</a> certification centre.<br />Try your <a href="http://www.webspherecertificate.com" target="_blank" rel="nofollow">Websphere (Test 285) </a> certification centre.<br />Try your <a href="http://www.j2mecertificate.com" target="_blank" rel="nofollow">SCMAD</a> certification centre. (New)<br /> <br /><a href="http://blogs.javacertificate.com" target="_blank" rel="nofollow">Java/J2EE Certification Blogging</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: IS such TYPE OF QUESTION ASKED IN SCJP REAL EXAM :((