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 JQPlus I/O question 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 "JQPlus I/O question" Watch "JQPlus I/O question" New topic

JQPlus I/O question

Micah Holroyd

Joined: Jan 22, 2001
Posts: 20
Which of the following encoding schemes is used by the jvm internally for storing identifiers, etc?
a) Unicode
b) UTF8
d) 8859-1
e) it depends on the platform
The listed answer is b, but I was almost certain the answer was a. If a is not the right answer, why not?
Fawad Khan
Ranch Hand

Joined: Feb 13, 2001
Posts: 36
Well ! for certification u must keep in mind that INTERNALLY the JVM stores as UTF8, the reason being the universality of the UTF as the name suggests. And by the way jsy start believing JQ+ as it is the best tool for certification.

Seeking Certification
Micah Holroyd

Joined: Jan 22, 2001
Posts: 20
Thanks for your reply Fawad. However I'm still a little confused. In Mughal's book (pg. 567) it says,
"Java programs represent characters internally in the 16-bit Unicode character encoding, but the host platform might use another character encoding to represent characters externally."
To me, this is saying that Unicode is used internally. Am I not understanding this quote correctly?
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3635
Internally Java uses UTF8 for string literals, identifiers etc because this format is more compact. Unicode chars always require 2 bytes to store any char but UTF8 takes only 1 byte to store standard ASCII chars.

Get Certified, Guaranteed!
(Now Revised for the new Pattern)

Your guide to SCJD exam!
Try out the world's only WebCompiler!

Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
I agree. Here's the link:
subject: JQPlus I/O question
It's not a secret anymore!