Int foo = (int) Math.max(bar);
Int foo = (int) Math.min(bar);
Int foo = (int) Math.abs(bar);
Int foo = (int) Math.ceil(bar);
Int foo = (int) Math.floor(bar);
Int foo = (int) Math.round(bar);
单选题Which code determines the int value foo closest to, but not greater than, a double value bar?()AInt foo = (int) Math.max(bar);BInt foo = (int) Math.min(bar);CInt foo = (int) Math.abs(bar);DInt foo = (int) Math.ceil(bar);EInt foo = (int) Math.floor(bar);FInt foo = (int) Math.round(bar);
点击查看答案
单选题10. interface Foo { int bar(); } 11. public class Sprite { 12. public int fubar( Foo foo) { return foo.bar(); } 13. public void testFoo() { 14. fubar( 15. // insert code here 16.); 17. } 18. } Which code, inserted at line 15, allows the class Sprite to compile?()AFoo { public int bar() { return 1; } }Bnew Foo { public int bar() { return 1; } }CnewFoo() { public int bar(){return 1; } }Dnew class Foo { public int bar() { return 1; } }
多选题public class Foo { private int val; public foo(int v) (val = v;) } public static void main (String args) { Foo a = new Foo (10); Foo b = new Foo (10); Foo c = a; int d = 10; double e = 10.0; } Which three logical expression evaluate to true? ()A(a ==c)B(d ==e)C(b ==d)D(a ==b)E(b ==c)F(d ==10.0)
单选题Given: 8.int index = 1: 9.Boolean [] test = new boolcan [3]; 10.boolcan foo = test [index]; What is the result()?Afoo has the value of 0.Bfoo has the value of null.Cfoo has the value of true.Dfoo has the value of false.EAn-exception is thrown.FThe code will not compile.
单选题Which JSTL code snippet can be used to perform URL rewriting?()A ’ />B ’ />C ’ />D ’ />
单选题int index = 1; String test = new String; String foo = test[index]; What is the result?()AFoo has the value “”BFoo has the value nullCAn exception is thrownDThe code will not compile
单选题int index = 1; String [] test = new String[3]; String foo = test[index]; What is the result?()AFoo has the value “”BFoo has the value nullCAn exception is thrownDThe code will not compile