wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What are the valid identifiers in the code given? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What are the valid identifiers in the code given?" Watch "What are the valid identifiers in the code given?" New topic
Author

What are the valid identifiers in the code given?

kishor kotecha
Greenhorn

Joined: Oct 02, 2000
Posts: 27
What are the valid identifiers in the following?
Select all valid answers or none.
a. char a = 'a';
b. char \u0061 = 'a';
c. ch\u0061r a = 'a';
All are correct!!! Surprised at b & c are correct?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
The reason being that Unicode gets translated during the reading of a line, so the compiler sees a translated String.
This is the reason you can't use the Unicode representation for carriage-return and new-line in Strings - they get translated into a line end when the compiler reads the source.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What are the valid identifiers in the code given?
 
Similar Threads
Correctly specified Identifiers
Mughal MockExam ( internet downloaded)
Class name's as Identifiers
unicode - URGENT PL HELP
Unicode