报错如下
PS C:\Users\xxx\Desktop\java\study> javac Demo1_Constant.java
Demo1_Constant.java:4: 错误: 编码GBK的不可映射字符
鍦?
^
1 个错误
解决编译时指定编码
PS C:\Users\Yahweh\Desktop\java\study> javac Demo1_Constant.java -encoding utf-8
PS C:\Users\Yahweh\Desktop\java\study> java Demo1_Constant
This is String!好呀
网友评论