cannot be resolved cannot be resolved to a type


cannot be resolved cannot be resolved to a type

文章插圖
大家好,小跳來為大家解答以上的問題 。cannot be resolved to a type,cannot be resolved這個很多人還不知道,現在讓我們一起來看看吧!
1、嗯 。
2、這個問題很有深度,經過我代碼粘貼和MyEclipse測試,終于知道什么問題了 。
3、主要是ResultSet rs=***.executequery("select * from cc");中sql沒有定義,因為sql在try,catch范圍內,需要把這條與句改為:try{Connection con=***.getconnection("jdbc:odbc:ee");Statement sql=***.createstatement();ResultSet rs=***.executequery("select * from cc");}catch(SQLException e){} 。
【cannot be resolved cannot be resolved to a type】本文到此分享完畢,希望對大家有所幫助 。