File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes IS THIS LEGAL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IS THIS LEGAL" Watch "IS THIS LEGAL" New topic


Ajay Kumar Rana

Joined: Feb 27, 2008
Posts: 13
Is this declaration legal char a = �\u0061�; if not why?
Raj Kumar Bindal
Ranch Hand

Joined: Apr 15, 2006
Posts: 418
This is a valid declaration as you are assigning unicode value of a to a.

I have executed following program:

output is :
a a
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15084

See your other post.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

Make sure that your single quotes are in the ASCII character set and not curly-quotes or back-quotes.

[ March 05, 2008: Message edited by: Kaydell Leavitt ]
I agree. Here's the link:
subject: IS THIS LEGAL
It's not a secret anymore!