接口中的問題
在學(xué)習(xí)中發(fā)現(xiàn)有如下寫法,請問該如何理解
????Collection conn = null;
????PrepareStatement pstmt = null;
????conn = DriverManager.getConnection(...);
????pstmt = conn.prepareStatement(...);
在學(xué)習(xí)中發(fā)現(xiàn)有如下寫法,請問該如何理解
????Collection conn = null;
????PrepareStatement pstmt = null;
????conn = DriverManager.getConnection(...);
????pstmt = conn.prepareStatement(...);
2018-06-13
舉報(bào)
2019-02-20
這個語法本質(zhì)上創(chuàng)建的對象使一個地址字符串,賦null值得意思就是沒有給這個對象地址字符串,也就是沒有開辟它的空間
2018-06-14
先定義兩個對象,然后又給對象賦值