代码:int recordCount=db.doCount(null).intValue();//db.doCount(null)返回long型
谢谢!

解决方案 »

  1.   

    long a = 1234567891;
    int b = (int)a;
      

  2.   

    强制类型转换:int recordCount=(int) db.doCount(null).intValue();//db.doCount(null)返回long型.  这样会使数据截断
      

  3.   

    是不是应该只能截断,不过问题是解决了,这谁都知道的方法倒忘了,呵呵。
    我还有不明白的是为什么在JDK1.4的API中的java.lang.long.intValue()不能用,会提示long cannot be dereferenced 
    还有,怎么给分?