Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IS THIS LEGAL

 
Ajay Kumar Rana
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is this declaration legal char a = �\u0061�; if not why?
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic