编程语言单选难度 3真题改编 · 2024
901. 以下语句使用PreparedStatement接口向mysql数据库中插入成功插入数据:
String sql="insert into users(username,password,age) values(?,?,?)";
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,"lisi");
ps.setString(2,"123456");
ps.setInt(3,24);
ps.executeUpdate();
试问,执行sql语句ps.executeUpdate()的返回值是:( )
练习本题 ›
综合知识单选难度 3真题改编 · 2025
924. 请为横线处选择合适的程序,使得程序的运行结果是1 2 3 4()
class A
{
int a1;
protected :
int a2;
public:
A(int x,int y):a1(x),a2(y){}
void f1(){cout<<a1<<" "<<a2;}
};
class B:protected A
{
int b1;
public:
B(int x,int y,int z):A(x,y),b1(z){}
void g1(){f1();cout<<" "<<b1;}
};
class D:public B
{
int d1;
public:
D(int x,int y,int z,int k):B(x,y,z),d1(k){}
void h1(){__________________________________;}
};
int main()
{
D ob1(1,2,3,4);
ob1.h1();
return 0;
}
练习本题 ›