1、凌志软件中级软件工程师选择题1:if(a==true)What will be the result of executing the following code? boolean a = true; boolean b = false; boolean c = true; if (a == true) if (b == true) if (c == true) System.out.println("Some things are true in this world"); else System.out.println("Nothing i
2、s true in this world!"); else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false"); else System.out.println("Hey this won't compile"); Choices: Whatwillbetheresultofexecutingthefollowingcode?booleana=true;booleanb=false;booleanc=true;if(b==t
4、thisworld"willbeprintedC."Heythiswon'tcompile"willbeprintedD.Noneofthese2:使用JDBC可以做到的是A.把二进制代码传送到任何关系数据库中B.把Java源代码传送到任何关系数据库中C.把表单信息传送到任何关系数据库中D.很容易地把SQL语句传送到任何关系数据库中3:The following code is entire contents of a file called Example.java,causes precisely one error during compilation: class SubClass
5、 extends BaseClass{ } class BaseClass(){ String str; public BaseClass(){ System.out.println(“ok”);} public BaseClass(String s){ str=s;}} public class Example{ public void method(){ SubClass s=new SubClass(“hello”); BaseClass b=new BaseClass(“world”); } } Which line would
6、 be cause the error? ThefollowingcodeisentirecontentsofafilecalledExample.java,causespreciselyoneerrorduringcompilation:classSubClassextendsBaseClass{}classBaseClass(){Stringstr;publicBaseClass(){System.out.println(“ok”);}publicBaseClass(Strings){str=s;}}publicclassExample{publicvoidmethod(){SubCl