File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Associate Certification (OCAJP 7/8)
char data type and Unicode
Joined: Jul 09, 2013
Jul 21, 2013 16:55:08
, is char the only data type that Unicode can be assigned to?
char d = '\u003E';
Can the Unicode characters on the R.H. side of the assignment be assigned to another data type?
Joined: Oct 14, 2005
Jul 21, 2013 18:21:28
They can be put into
literals as well:
String hello = "\u0048\u0069";
Ivan Jozsef Balazs
Joined: May 22, 2012
Jul 22, 2013 23:40:08
A Unicode value is simply an integral value. All these work:
byte b = '\u003E'; char c = '\u003E'; short s = '\u003E'; int i = '\u003E'; long l= '\u003E';
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: char data type and Unicode
K&B Java 1.4 Study Guide error on page 16 Scenario & Solution
char primitive initialization values
Increment a character...
What is the range for unicode values in char data type?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015