This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement related query

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body I have a query related to PreparedStatement.

Is it necessary to explicit cast to conn.prepareStatement(sqlQuery); ?

My code is like this :


Which one is better ?

regards,
S
 
Smitesh Shinde
Ranch Hand
Posts: 45
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need to explicitly cast it as conn.prepareStatement itself returns object of type PreparedStatement
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic