java中的中文变量和方法

在网上看到java居然支持中文变量名、方法。这里我只试了变量名和方法,类名这些没有试...。真是给力

 1 package com.gxf.fun;
 2 
 3 
 4 public class TestForChinese {
 5     private String 字符串 = "字符串";
 6     
 7     public void 输出方法(){
 8         System.out.println("这是输出方法!");
 9     }
10     
11     public static void main(String[] args) {
12         TestForChinese testForChinese = new TestForChinese();
13         System.out.println(testForChinese.字符串);
14         testForChinese.输出方法();
15     }
16 
17 }

输出

字符串
这是输出方法!
原文地址:https://www.cnblogs.com/luckygxf/p/4268520.html