Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java unicode characters

U+0020
U+00A0
U+2002
Comment

unicode in java

/* Java language uses Unicode character set to manage text.
   A character set is an ordered list of characters, each assigned a numeric value.
   In Unicode, each character is represented as a 16-bit numeric value.
   Unicode character table can be found at: https://unicode-table.com/en/
*/

// Digits are assigned numeric values: '0': 48, '1': 49, ..., '9': 57
System.out.println(1 + '0'); // prints 49, the unicode of '1'
System.out.println(1 + '8'); // prints 57, the unicode of '8'

// Uppercase letters: 'A': 65, 'B': 66, 'C': 67, ..., 'Z': 90
System.out.println((char) (1+'B')); // prints letter 'C' out

// Lowercase letters: 'a': 97, 'b': 98, ..., 'z': 122
System.out.println((char) (1 + 'a')); // prints letter 'b' out

// Note that adding 32 to unicode of uppercase letter  
// gives its lowercase equivalent
System.out.println((char) (32 + 'A')); // prints 'a'
System.out.println((char) (32 + 'Z')); // prints 'z'
Comment

unicode in java


String s = Character.toString((char)c);

Comment

PREVIOUS NEXT
Code Example
Java :: java lambda 
Java :: rotate matrix in java 
Java :: how to set current item for spinner android 
Java :: convert long to localdatetime java 
Java :: java listview 
Java :: how to delete last array in java 
Java :: how to check if array is full java 
Java :: alert dialog not displayed android 
Java :: how to get last index of array in java 
Java :: searchview android example recyclerview 
Java :: how to call child class method from parent class in java 
Java :: springboot avoid generated security password: 
Java :: javafx initialize 
Java :: java 8 stream add to list 
Java :: /bin/sh 1 java not found docker 
Java :: array srting line by line in textview android 
Java :: jbutton 
Sql :: mysql how to truncate table with foreign keys 
Sql :: postgres get columns names 
Sql :: running query in redshift 
Sql :: check connections to database postgres 
Sql :: mysql workbench in ubuntu 14.04 
Sql :: Remove mySQL from ubuntu 20.x 
Sql :: how to check port number for postgresql 
Sql :: while loop sql 
Sql :: mysql select random id from table 
Sql :: oracle search code in packages 
Sql :: psql get sequences 
Sql :: how to check last gather stats on table in oracle 
Sql :: oracle drop column 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =