File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes java.util.Locale will accept any String... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "java.util.Locale will accept any String..." Watch "java.util.Locale will accept any String..." New topic
Author

java.util.Locale will accept any String...

Chandella Montero
Ranch Hand

Joined: Feb 18, 2011
Posts: 89
and will compile and run! Watch out for this one on the exam:



The output is:

heaven

Process completed.


OCA, OCP Java 6
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Is that an observation or a question?
Chandella Montero
Ranch Hand

Joined: Feb 18, 2011
Posts: 89
It was an observation. I don't really know why, but just realised that it happens, so it's something to watch out for.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.util.Locale will accept any String...