网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
publicstaticvoidmain(String[]args){Integera=newInteger(10);Integerb=newInteger(10);Integerc=a;intd=10;doublee=10.0;}Whichthreeevaluatetotrue?()

A.(a==c)

B.(d==e)

C.(b==d)

D.(a==b)

E.(b==c)

F.(d==10.0)


参考答案

更多 “ publicstaticvoidmain(String[]args){Integera=newInteger(10);Integerb=newInteger(10);Integerc=a;intd=10;doublee=10.0;}Whichthreeevaluatetotrue?() A.(a==c)B.(d==e)C.(b==d)D.(a==b)E.(b==c)F.(d==10.0) ” 相关考题
考题 在Java中,下列代码将输出()。1.publicclassintegerequals2.{3.publicstaticvoidmain(Stringargs[])4.{5.Integera=newInteger(3);6.Integerb=newInteger(3);7.System.out.println(a==b);8.}9.} A.编译器将显示第7行有错误B.程序编译并打印trueC.程序编译并打印falseD.程序编译但在第7行引起了一个运行期意外

考题 本题中,用表格表现某个月的月历,其中标题是从Sunday到Saturday,表格中的各项是可以修改的。 import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; public class java2 ( public static void main(String[]args) { try{ UIManager.setLookAndFeel(UIManager.getSys- temLookAndFeelClassName): } catch(Exception e) JFrame. frame=new CalendarTableFrame; frame.setDefaultCloseOperation(JFrame.EXIT_ oN CLOSE); frame.show; } } clasgCalendarTableFrame. extends JFrame { private static final int WIDTH=500; private static final int HEIGHT=150: private cells= { {null,null,null,new Integer(1),new Integer (2),new Integer(3),new Integer(4)), {new Integer(5),new Integer(6),new Integer (7).new Integer(8),new Integer(9),new Integer (10),new Integer(11)), {new Integer(12),new Integer(13),new Integer (14),new Integer(15),new Integer(16),new Integer (17),new Integer(18)), {new Integer(19),new Integer(20),new Integer (21),new Integer(22),new Integer(23),new Integer (24),new Integer(25)), {new Integer(26),new Integer(27),new Integer (28),new Integer(29),new Integer(30),new Integer (31),null} }; private String[]columnNames={ "Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday" }; public CalendarTableFrame{ setTitle("java2"); setSize(WIDTH,HEIGHT); JTable table=new ; getContentPane.add(new JScrollPane(table), BorderLayout.CENTER); } }

考题 classBeta{publicstaticvoidmain(String[]args){Integerx=newInteger(6)*7;if(x!=42){System.out.print(42);}elseif(x〈newInteger(44-1)){System.out.println(less);}else{System.out.print(done);}}}结果是什么?()A.lessB.42C.doneD.编译失败

考题 public static void main(String[]args){Integer i=new Integer(1)+new Integer(2);switch(i){case3:System.out.println(three);break;default:System.out.println(other);break;}}Whatistheresult?()A.threeB.otherC.Anexceptionisthrownatruntime.D.Compilationfailsbecauseofanerroronline12.E.Compilationfailsbecauseofanerroronline13.F.Compilationfailsbecauseofanerroronline15.

考题 1.importjava.util.*;2.publicclassExample{3.publicstaticvoidmain(String[]args){4.//insertcodehere5.set.add(newinteger(2));6.set.add(newinteger(l));7.System.out.println(set);8.}9.}Whichcode,insertedatline4,guaranteesthatthisprogramwilloutput[1,2]?()A.Setset=newTreeSet();B.Setset=newHashSet();C.Setset=newSortedSet();D.Listset=newSortedList();E.Setset=newLinkedHashSet();

考题 publicclassBoxer1{2.Integeri;3.intx;4.publicBoxer1(inty){5.x=i+y;6.System.out.println(x);7.}8.publicstaticvoidmain(String[]args){9.newBoxer1(newInteger(4));10.}11.}Whatistheresult?() A.Thevalue“4”isprintedatthecommandline.B.Compilationfailsbecauseofanerrorinline5.C.Compilationfailsbecauseofanerrorinline9.D.ANullPointerExceptionoccursatruntime.E.ANumberFormatExceptionoccursatruntime.F.AnIllegalStateExceptionoccursatruntime.

考题 publicclassFoo{privateintval;publicfoo(intv)(val=v;)}publicstaticvoidmain(String[]args){Fooa=newFoo(10);Foob=newFoo(10);Fooc=a;intd=10;doublee=10.0;}Whichthreelogicalexpressionevaluatetotrue?() A.(a==c)B.(d==e)C.(b==d)D.(a==b)E.(b==c)F.(d==10.0)

考题 publicclassFoo{privateintval;publicfoo(intv)(val=v;)}publicstaticvoidmain(Stringargs){Fooa=newFoo(10);Foob=newFoo(10);Fooc=a;intd=10;doublee=10.0;}Whichthreelogicalexpressionevaluatetotrue?() A.(a==c)B.(d==e)C.(b==d)D.(a==b)E.(b==c)F.(d==10.0)

考题 下列语句中,能完成用整型数10创建一个Integer对象的是( )。A.Integeri=10;B.Integeri=newInteger(10);C.inti=newInteger(10);D.inti=10;