public class Test { public static void main(String[] args) { StringBuffer sb = new StringBuffer("a"); StringBuffer[] sbs = new StringBuffer[]{sb,null}; sb.append("b"); sb = null; sbs[0].append("c"); System.out.println(sbs[0]); sbs[0] = null; sbs = null; }
}
解释下为什么打印abc! sbs[0] = null; sbs = null; 这二句又是什么意思?
先上错误 无法联接数据库 java.sql.SQLException: Before start of result set at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......