题目内容

若要求查找‘李’姓学生的学生号和姓名,对应的SQL语句是SELECT S#,SNAME FROM S WHERE SNAME LIKE ‘李%’。

A. 对
B. 错

查看答案
更多问题

8.1在横线上填上适当的语句,使程序能正常运行。class Test{【1】float fl;【2】{num=1;f1=2.0f;}public int getint(){return num;}public float getfloat(){return fl;}}class Demo{public static void main(String []args){{ 【3】t=new Test();System.out.print(t.getint()+” “+t.getfloat());}运行结果为:1 2.0

8.2在横线上填上适当的语句,使程序能正常运行。【1】{【2】(inta,intb){returna-b;}}classStudentDemo{publicvoidshow(Students,inta,intb){System.out.println(s.sum(a,b));}}publicclassDemo{publicstaticvoidmain(String[]args){intx=20,y=10;Students=【3】;【4】=newStudentDemo();st.show(s,x,y);}}

8.3在横线上填上适当的语句,使程序能正常运行。【1】{【2】publicvoidsetAge(inta){age=a;}【3】{【4】}}publicclassDemo{publicstaticvoidmain(String[]args){Students=【5】s.age=20;System.out.println(s.getAge());//显示age的值}}

8.4阅读程序,写出运行结果classStudent{privateStringname;publicstaticintage=20;publicStudent(Stringname){this.name=name;age++;}publicvoidshow(){System.out.println("name="+name+",age="+age);}}publicclasst{publicstaticvoidmain(String[]args){Students1=newStudent("张同学");s1.show();Students2=newStudent("赵同学");s2.show();s1.show();}}

答案查题题库