你写的这个类是不是有问题呢。可以这样吗?至少也是要这样吧。
public class hello{
  {System.out.println("hello world");}
}
而且你如果要运行也应该这样吧
public class hello{
 public static void main(String [] args)  
 {System.out.println("hello world");}
}