Unicode Printing in Java- abstract characters -


i'm making program prints unicode characters. looks this:

public class test {     public static void main(string[] args) {         system.out.println('\u00a5');         system.out.println((char) 0x00a5);         system.out.println((char) (integer.parseint("00a5", 16)));         system.out.println('\u261e');         system.out.println((char) 0x261e);         system.out.println((char) (integer.parseint("261e", 16)));     } } 

the output looks like:

¥ ¥ ¥ ? ? ? 

why latter half print question marks?

i can understand program printing japanese character, when change \u261e, can't recognize it. help?

if want apply changes specific project then:

go project properties -> change text file encoding utf-8

this project specific changes

or

if want apply projects globally then:

got window -> preferences -> general -> workspace : text file encoding

this global changes

note:

if using other ide, should have similar option there too.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -