java程序System.out.println()中文乱码,很奇怪的问题,知道朋友给我留言告诉我!

我的源代码如下: Test.java

public class Test {
	
	public static void main(String[] args) {
		System.out.println("SELECT userId , userName , userType , email , telephone , [password] FROM users WHERE ( email =  '令狐冲'  OR userName =  '令狐冲'  OR telephone =  '令狐冲'  ) AND [password] =  '123456'  ");
	}
}

可是打印到控制台就变成了

SELECT userId , userName , userType , email , telephone , [password] FROM users WHERE ( email =  '令狐冲'  OR userName =  '令狐??'  OR telephone =  '令狐冲'  ) AND [password] =  '123456'  

大家看,令狐冲变成了令狐??,大家看下怎么回事,我的Test.java文件编码是gbk的。

有谁知道原因的,给我留言,我一直不知道是什么原因造成的这种情况?

你可能感兴趣的:(java调试,Java)