include <string> #include <iostream> using namespace std ; int main() { string s1; cout << "Enter a sentence: "; getline(cin,s1); cout << "You entered: " << s1 << endl;; }
下面的例子包含两个查询方法,一个返回int类型、另一个返回了String类型。 + +``` +import javax.sql.DataSource; +import org.springframework.jdbc.core.JdbcTemplate; + +public class RunAQuery { + + private JdbcTemplate jdbcTemplate; + + public void setDataSource(DataSource dataSource)...