不会吧!将你的包所在的文件夹路径添加到CLASSPATH中再编译试试!
譬如:
ConsoleReader包在d:\mypackage下,就将d:\mypackage添加到CLASSPATH中!

解决方案 »

  1.   

    包的使用代码package ConsoleReader;public class arrayConversiontemp
    {
        private  int[][] _data = null;
        public arrayConversiontemp(int[][] data)
        {
        this._data = data;//构造函数,传递数组
        }    public String getFormatStr()
     {   if (_data==null||_data.length==0||this._data[0].length==0)
      {
             return null;//如果数组为空
          }   int rowCount= this._data.length;//获取行数
      int colCount= this._data[0].length;//获取列数
      //定义返回字符串
        String output = "The Data of two dimensional array:\n";
    for (int i=0;i<rowCount ;i++ )
    {  //输出原始二维数组
        for (int j=0;j<colCount ;j++ )
    {
           if ( j == 0 && i == 0 )                    
       output += "┏";
           if ( j == 0 && i == rowCount-1 )           
       output += "┗";
           if ( j == 0 && i != 0 && i != rowCount-1)  
       output += "┃";
           //二维数组的输出
          output += " "+_data[i][j]+" ";       if ( j == colCount-1 && i != 0 && i != rowCount-1)            
      output += "┃";
          if ( j == colCount-1 && i == 0 )               
      output += "┓";
          if ( j == colCount-1 && i == rowCount-1 )                     
      output += "┛";
            }
            output += "\n";
    }
    return output;
    }
     
    /*
        public static void main(String[] args)
        {
    //预设 5 * 4 的矩阵数据
    int[][] Data =
    {   {9, 7, 6, 6},
        {9, 7, 6, 6},
        {3, 5, 3, 3},
        {6, 6, 4, 7},
        {7, 5, 1, 4},
        {1, 2, 8, 0}
    }; arrayConversiontemp temp = new arrayConversiontemp(Data);
    System.out.println(temp.getFormatStr());    }
    */
    }