DTR100参数“AF Line OUT Pri”设定为-10.0dBm,表示()。
第1题:
A.Line 26 prints "a" to System.out.
B.Line 26 prints "b" to System.out.
C.An exception is thrown at line 26 at runtime.
D.Compilation of class A will fail due to an error in line 6.
第2题:
当你编译运行下列程序代码,会得到什么结果?
private class Base{ Base(){ int i = 100; System.out.println(i); } }
public class Pri extends Base{ staticint i = 200;
public static void main(String argv[]){ Pri p = new Pri(); System.out.println(i); } }
A.这段代码不能通过编译
B.输出200
C.输出100和200
D.输出100
第3题:
ClassTestException1.publicclassTestExceptionextendsException{2.}Classa:1.publicclassa{2.3.publicStringsayHello(Stringname)throwsTestException{4.5.if(name==null){6.thrownewTestException();7.}8.9.returnHello+name;10.}11.12.}Aprogrammerwantstousethiscodeinanapplication:45.Aa=newA();46.System.out.println(a.sayHello(”John”));Whichtwoaretrue?()
A.Classawillnotcompile.
B.Line46canthrowtheuncheckedexceptionTestException.
C.Line45canthrowtheuncheckedexceptionTestException.
D.Line46willcompileiftheenclosingmethodthrowsaTestException.
E.Line46willcompileifenclosedinatryblock,whereTestExceptioniscaught.
第4题:
Given the following code fragment: 1) String str = null; 2) if ((str != null) && (str.length() > 10)) { 3) System.out.println("more than 10"); 4) } 5) else if ((str != null) & (str.length() < 5)) { 6) System.out.println("less than 5"); 7) } 8) else { System.out.println("end"); } Which line will cause error?()
第5题:
遥控台主/备DTR100ALB-S卡之间的“SWD”口用信号线相连,其作用是()。
第6题:
which order is an equivalent to “send out head line”?
第7题:
A.编译错误
B.200
C.100200
D.100
第8题:
Giventhefollowingcodefragment:1)Stringstr=null;2)if((str!=null)&&(str.length()>10)){3)System.out.println("morethan10");4)}5)elseif((str!=null)&(str.length()<5)){6)System.out.println("lessthan5");7)}8)else{System.out.println("end");}Whichlinewillcauseerror?()
A.line1
B.line2
C.line5
D.line8
此题需要将代码仔细看清楚,查询没有逻辑错误,if…else的使用没有问题,也没有拼写错误,错误在于第5行的“与”操作符的使用,逻辑操作符(logicaloperator)的“与”应该是&&,而&是位逻辑操作符(bitwiselogicaloperator)的“与”,使用的对象不一样,逻辑操作符的“与”的左右操作数都应该是布尔型(logicalboolan)的值,而位逻辑操作符的左右操作数都是整型(integral)值。
第9题:
发射状态时,遥控台DTR100选择主AF线还是备AF线是()。
第10题:
1. public class A { 2. 3. private int counter = 0; 4. 5. public static int getInstanceCount() { 6. return counter; 7. } 8. 9. public A() { 10. counter++; 11. } 12. 13. } Given this code from Class B: 25.A a1 =new A(); 26. A a2 =new A(); 27. A a3 =new A(); 28. System.out.printIn(A.getInstanceCount() ); What is the result?()