File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

char data type and Unicode

 
Glenn Gould
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java, is char the only data type that Unicode can be assigned to?

For example,

char d = '\u003E';

Can the Unicode characters on the R.H. side of the assignment be assigned to another data type?
 
Paul Clapham
Sheriff
Pie
Posts: 20161
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They can be put into String literals as well:


 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Unicode value is simply an integral value. All these work:

 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic