程序如下:public class test
{
public static void main (string [ ] args)
{
system.out.print("hello");
}
}出现的错误提示是
D:\java>javac test.java
test.java:3: cannot resolve symbol
symbol  : class string
location: class test
public static void main (string [ ] args)
                         ^
test.java:5: package system does not exist
system.out.print("hello");请教是怎么回事?谢谢

解决方案 »

  1.   

    system.out.print("hello");
    System.out.print("hello");
      

  2.   


    string  --->>  Stringsystem  --->>  System
    Java是大小写敏感的,要注意大小写
    建议test 写成 Test,比较符合规范,当然不写成Test也没错
      

  3.   

    public class Test {
    public static void main(String[] args) {
      System.out.println("Hello World");
    }
    }
      

  4.   

    public class Test{
    public static void main(String args[]){
    System.out.println("Hello");
    }
    }
      

  5.   

    这样也会写错,是:System.out.print("hello");
      

  6.   

    public class Test
    {
    public static void main (String [ ] args)
    {
    System.out.print("hello");
    }
    }注意大小写。。也不要带中文符号,,