hello hellol = new hello();
//应该是
useabs hellol = new useabs();

解决方案 »

  1.   

    new hello();此乃何方神圣?
      

  2.   

    new hello();
    该类在哪呀?
      

  3.   

    abstract class hellobase
    {
      private int i;
      abstract  void base();
    }
    public class useabs extends hellobase 
    {
      private String i;  public  void base()
      {
        System.out.println("true");
      }
      public static void main(String[] args) 
      {
         hellobase hello1=new hellobase();
         hello1=new useabs();
         try
           {
             hello1.base();
            }
         catch (AbstractMethodError e)
           {
            System.out.println("false;");
            }
       }
    }
    你试一下这个就明白了,因为是虚函数,所以必须重新覆盖所有虚方法后才能使用,声明时也必须是先声明一个虚对象的引用,再把实例地址付值给他!
      

  4.   

    没有hello这个类,当然报错~~~
      

  5.   

    hellobase hello1=new useabs();就行了