*
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
Author

IS THIS LEGAL

Ajay Kumar Rana
Greenhorn

Joined: Feb 27, 2008
Posts: 13
Hi,
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: 14114
    
  16

See your other post.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
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: http://aspose.com/file-tools
 
subject: IS THIS LEGAL