这就是“易语言”?

阅读更多
java 代码
 
  1. import java.io.IOException;  
  2.   
  3. /** 
  4.  * 这就是易语言。 
  5.  */  
  6. public class ClassLoaderTest {  
  7.   
  8.     public static void main(String[] args) {  
  9.         系统.输出("你叫什么名字?");  
  10.         系统.输出("你好," + 系统.获得用户输入());  
  11.     }  
  12.   
  13.     static class 系统 {  
  14.         public static void 输出(String str) {  
  15.             System.out.println(str);  
  16.         }  
  17.   
  18.         public static String 获得用户输入() {  
  19.             try {  
  20.                 byte[] buffer = new byte[4096];  
  21.                 return new String(buffer, 0, System.in.read(buffer));  
  22.             } catch (IOException e) {  
  23.                 return "";  
  24.             }  
  25.         }  
  26.     }  
  27. }  

你可能感兴趣的:(D语言,Java)