aspose file tools*
The moose likes Associate Certification (OCAJP 7/8) and the fly likes char data type and Unicode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Associate Certification (OCAJP 7/8)
Bookmark "char data type and Unicode" Watch "char data type and Unicode" New topic
Author

char data type and Unicode

Glenn Gould
Greenhorn

Joined: Jul 09, 2013
Posts: 5
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
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

They can be put into String literals as well:


Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
A Unicode value is simply an integral value. All these work:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: char data type and Unicode