1、选择题1:以下的C程序代码片段运行后C和d的值分别是多少Inta=1,b=2;Intc,d;c=(a&b)&&a;d=(a&&b)&a;A.0,0B.0,1C.1,0D.1,12:1.What is the result when you compile and run the following code? 2. 3.public class Test 4. 5.{ 6. 7.public void method() 8. 9.{ 10. 11.for(int i = 0; i < 3; i++) 12. 13. { 14. 15
3、.0123C.CompilationerrorD.Noneofthese3:Math.round(11.5)等於多少?A.11B.12C.11.5D.none4:1.Give the following java class: 2.public class Example{ 3.static int x[]=new int[15]; 4.public static void main(String args[]){ 5.System.out.println(x[5]); 6.} 7.} 8.Which statement is corrected? Givet
4、hefollowingjavaclass:publicclassExample{staticintx[]=newint[15];publicstaticvoidmain(Stringargs[]){System.out.println(x[5]);}}Whichstatementiscorrected?A.Whencompile,someerrorwilloccur.B.Whenrun,someerrorwilloccur.C.Outputiszero.D.Outputisnull.5:1.Give the following java source fragement:
5、2.//point x 3.public class Interesting{ 4.//do something 5.} 6.Which statement is correctly Java syntax at point x? Givethefollowingjavasourcefragement://pointxpublicclassInteresting{//dosomething}WhichstatementiscorrectlyJavasyntaxatpointx?A.publicclassMyClass{//dootherthing…}B.stati