String[] pic_path=null;
String[] pic_content=null;
试试.

解决方案 »

  1.   

    String[] pic_path;
    String[] pic_content;
    没有出始化,
    String[] pic_path="";
    String[] pic_content="";
      

  2.   

    晕倒String[] pic_path="";
    String[] pic_content="";
    这都写得出来如果查询结果集里面没有数据   你这个程序肯定会有错误
    如果是在一个方法里面
    必须
    String[] pic_path=null;
    String[] pic_content=null;这应该是编译期异常吧
      

  3.   

    开始String[] pic_path = new String[100]
    String[] pic_content= new String[100];先要为数组分配空间!
      

  4.   

    看错了,不好意思,应该是row_count=0的关系!
      

  5.   

    我上边回复了   搂主没看么这应该是编译期异常吧如果是在一个方法里面
    必须
    String[] pic_path=null;
    String[] pic_content=null;
      

  6.   

    我也有个数组的问题:import java.io.*;
    class Output_InputDEmo{
    public static void main(String args[])throws IOException{//main()方法调用output()和input()方法
    output();
    input(); }
    public static void Output() throws IOExcepion{
    FileOutStream out=null;//if null then throws a Exception
    out = new FileOutputStream("test1.txt");//create a object
    System.out.println("从键盘上输入一批字符串,并以#结束");
    byte k[]=new byte[80];
    k[o]=0;
    while(k[0]!='#')
    try{
    for(int i=0;i<80;i++)
    k[i]='';
    System.in.read(k);}
    finally{
    out.write(k);}
    out.close();
    }
    public static void input() throws IOException{
    FileInputStream in=null;
    in = new FileInputStream(test1.txt);
    byte[]=new byte[80];
    System.out.println("从键盘上读取字符串!");
    in.read(k);
    while(k[0]!='#'){
    System.out.write(k);
    System.out.println();
    in.read();}
    in.close();
    }
    }
    }
    为什么在键盘上接受每个字符串的时,应先对数组清空????
      

  7.   

    out.print(pic_path[1]);应该放到大扩号里边。
      

  8.   

    哎!肯定是编译错误吗!你只是在if语句块中为其初始化了,万一他不进if了,你那数组不就什么都不是了吗?哪里还能找到什么pic_path[1],良好的编程风格是所有全局变量都应初始化。
      

  9.   

    如果if(rs_pic.next())条件不满足,那么你的数据就得不到初始化。这就是问题所在。这种情况建议使用ArrayList。ArrayList比Vector效率高,但不支持多线程。