我写的程序原代码是
public class hellouser{
     public static void main(string[] arguments){
     string username = system.getproperty("user.name");
     system.out.println("hello," + username);
}
}
但是就是编译不过去提示如下:
D:\hellouser.java:2: cannot resolve symbol
symbol  : class string 
location: class hellouser
     public static void main(string[] arguments){
                             ^
D:\hellouser.java:3: cannot resolve symbol
symbol  : class string 
location: class hellouser
     string username = system.getproperty("user.name");
     ^
D:\hellouser.java:3: cannot resolve symbol
symbol  : variable system 
location: class hellouser
     string username = system.getproperty("user.name");
                       ^
D:\hellouser.java:4: package system does not exist
     system.out.println("hello," + username);
           ^
4 errors
还请大家帮着看看!其他的程序和这个也是一样可能是我什么地方没配制好吧!请大家指条明路!

解决方案 »

  1.   

    注意大小写:是String而不是string
      

  2.   

    全是大小写的问题:
    public class hellouser{
         public static void main(String[] arguments){
         String username = System.getProperty("user.name");
         System.out.println("hello," + username);
    }
    }
      

  3.   

    还要注意编码规范,类名首字母也是要大写的,如果是组合单词的话每个单词首字母都要大写,像这样HelloWorld
      

  4.   

    learning~String这个类啊,基础中的重点!建议多看看API文档!
      

  5.   

    哦,I/O也不好学,呵呵System System,熟了就不会错了。
      

  6.   

    将 string 改为 String , system 改为 System
      

  7.   

    首字母大写,良好的命名习惯得慢慢养成的。I'm learning...
      

  8.   

    应该这样public class hellouser
     {
         public static void main(String[] args)
     {
         String username = System.getproperty("user.name");
         System.out.println("hello," + username);
    }
    }
      

  9.   

    还要注意java中主文件名要跟文件中public class的类名相同
      

  10.   

    应该这样public class HelloUser
     {
         public static void main(String[] args)
     {
         String username = System.getProperty("user.name");
         System.out.println("hello," + username);
    }
    }注意很多地方都要大写的