本帖最后由 yorkzjy 于 2010-01-31 05:14:28 编辑

解决方案 »

  1.   

    指出我需要加哪些东西进去就行了,很多exception之类的我都不懂
      

  2.   

    你用的是什么开发工具啊?Eclipse或MyEclipse直接可以提示异常信息的
      

  3.   


    我用的是cmd,直接javac编译。325行,额,但是水平有限,解决不了
     
      

  4.   

    那就是325行上某个点前面的对象null了呗
      

  5.   

    运行了一下明明报的是找不到文件嘛
    java.io.FileNotFoundException: data.txt (系统找不到指定的文件。)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at java.io.FileReader.<init>(FileReader.java:41)
    at dequeClient.main(dequeClient.java:304)
    IOexception 
      

  6.   

    BufferedReader br = new BufferedReader(new FileReader("data.txt"));
    在你c盘建个 date.txt  随便输点东西保存
    然后BufferedReader br = new BufferedReader(new FileReader("c:\data.txt"));
      

  7.   

    最外层调用方法Try, Catch下,然后把异常打印出来。
      

  8.   

    楼主能把你的data.txt文件贴出来嘛
     theChar = (Integer)(int)theLine.charAt(i);
    这个在char转行为int类型的时候转化为ASCII码int数据,这个不太懂楼主想做什么样的操作
    跟了下代码
     while(theChar > (Integer )theQueue.peekRear())
    --->
     第一次循环
     public boolean isFull()
        {
            return (rear+1)%super.length() == front;
        }
    此时返回false
    ---> public Object peekRear()
        {
            if(!isFull())
            {
                return super.get(rear);        }
            else
            {
                QueueError(ErrorMessage.UNDERFLOW);
                return null;
            }
        }
          public Object get( int index )
        {
            if ( index >= 0 && index < theArray.length )
                return theArray[index];
            else
                return Integer.MIN_VALUE;
        }
    此时theArray还为添加内容,此时会返回null
    while(theChar > (Integer )theQueue.peekRear())
    (Integer )null会报NullPointerException异常
      

  9.   

    lz,怎么我运行你的程序后,在console上打印出‘IOexception’
    有异常么?
      

  10.   

    这个程序我已经重写了,不考虑多态之类的了,初学java,还是不要搞的太复杂。