java怎么输出版权符号?

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:18:43
public class test {

/** Creates a new instance of test */
public test() {
}
public static void main(String arg[])
{
System.out.print("版权符号:©");
}
}
运行结果:
版权符号:?
问如何输出这个符号

楼主,我尝试用版权符号的Unicode编码\u00A9也无法在控制台显示出来。不妨使用©来代替©符号,这也挺通用的。

public class Test
{
/** Creates a new instance of test */
public Test() {
}
public static void main(String arg[])
{
System.out.println("版权符号:"+'\u00A9');
System.out.println("版权符号:'\u00A9'");
}
}
要使用单引号就可以了。