解决方案 »

  1.   

     while (lexeme !=null && iks.hasNext() ) 
    类似于这样的代码试试。
      

  2.   

    郁闷呢...没有这个或者类似的方法
    没有你自己写一个啊?你不是有next()方法么,if -->iks.next()==null 返回true 否则返回false,参数传入你的这个lexeme 类型对象
      

  3.   

     while ((lexeme = iks.next()) != null)你判断exeme   和iks 分别什么类型的。
      

  4.   

    可以先next一遍进行判断,然后循环中再次next