Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
207 views
in Technique[技术] by (71.8m points)

java - execute() and executeUpdate() methods are implemented in

execute() and executeUpdate() methods are of Statement Interface of java.sql package. But these are not default methods hence these are abstract methods so where is the implementation of these methods?

question from:https://stackoverflow.com/questions/65914527/execute-and-executeupdate-methods-are-implemented-in

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Statement is an abstraction for a class that the loaded JDBC driver must provide a concrete implementation for that works with the specific database you're using. Every database has slightly different requirements.

It's buried inside the library, but you don't have to worry about that if you use proper dependency injection.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...