A Bar is a Baz.
A Foo has a Bar.
A Baz is a Foo.
A Foo is a Baz.
A Baz has a Bar.
第1题:
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?()
第2题:
Given the security constraint in a DD:// 101.
第3题:
Which code determines the int value foo closest to a double value bar?()
第4题:
Which statements concerning the relationships between the following classes are true?() class Foo { int num; Baz comp = new Baz(); } class Bar { boolean flag; } class Baz extends Foo { Bar thing = new Bar(); double limit; }
第5题:
A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
第6题:
10. interface Foo { 11. int bar(); 12. } 13. 14. public class Beta { 15. 16. class A implements Foo { 17. public int bar() { return 1; } 18. } 19. 20. public int fubar( Foo foo) { return foo.bar(); } 21. 22. public void testFoo() { 23. 24. class A implements Foo { 25. public int bar() { return 2; } 26. } 27. 28. System.out.println( fubar( new A())); 29. } 30. 31. public static void main( String[] argv) { 32. new Beta().testFoo(); 33. } 34. } Which three statements are true?()
第7题:
MANAGER can do a GET on resources in the /Bar/Baz directory.
MANAGER can do a POST on any resource in the /Bar/Baz directory.
MANAGER can do a TRACE on any resource in the /Bar/Baz directory.
DEVELOPER can do a GET on resources in the /Bar/Baz directory.
DEVELOPER can do only a POST on resources in the /Bar/Baz directory.
DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.
第8题:
Baz has the value of 0
Baz has the value of 1
Baz has the value of 2
An exception is thrown.
The code will not compile.
第9题:
Java Test 2222
Java Test 1 2 3 4
Java Test 4 2 4 2
Java Test 4 3 2 1
第10题:
MANAGER can do a GET on resources in the /Bar/Baz directory.
MANAGER can do a POST on any resource in the /Bar/Baz directory.
MANAGER can do a TRACE on any resource in the /Bar/Baz directory.
DEVELOPER can do a GET on resources in the /Bar/Baz directory.
DEVELOPER can do only a POST on resources in the /Bar/Baz directory.
DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.
第11题:
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);
第12题:
<prefix:myTag a=foo b=bar c=baz />
<prefix:myTag attributes={foo,bar,baz} />
<prefix:myTag jsp:attribute a=foo b=bar c=baz />
<prefix:myTag><jsp:attribute name=a>foo</jsp:attribute><jsp:attribute name=b>bar</jsp:attribute><jsp:attribute name=c>baz</jsp:attribute>. </prefix:myTag>
第13题:
package foo; public class Outer ( public static class Inner ( ) ) Which statement is true? ()
第14题:
public class Test { public static void main( String[] args) { String foo = args[1]; String bar = args[2]; String baz = args[3]; System.out.println(“baz = “ + baz); } } And the command line invocation: java Test red green blue What is the result?()
第15题:
public class Test { public static void main (String[]args) { String foo = args[1]; String bar = args[2]; String baz = args[3]; System.out.printIn(“baz = ” + baz); } } And the output: Baz = 2 Which command line invocation will produce the output?()
第16题:
What is wrong with the following code?() class MyException extends Exception {} public class Qb4ab { public void foo() { try { bar(); } finally { baz(); } catch (MyException e) {} } public void bar() throws MyException { throw new MyException(); } public void baz() throws RuntimeException { throw new RuntimeException(); } }
第17题:
int index = 1; int foo = new int ; int bar = foo [index]; int baz = bar + index; What is the result?()
第18题:
public class Foo { public int a; public Foo() { a = 3; } public void addFive() { a += 5; } } and: public class Bar extends Foo { public int a; public Bar() { a = 8; } public void addFive() { this.a +=5; } } invoked with: Foo foo = new Bar(); foo.addFive(); System.out.println(”Value: “+ foo.a); What is the result?()
第19题:
Value: 3
Value: 8
Value: 13
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
第20题:
baz =
baz = null
baz = blue
Compilation fails.
An exception is thrown at runtime.
第21题:
An instance of the Inner class can be constructed with “new Outer.Inner ()”
An instance of the inner class cannot be constructed outside of package foo.
An instance of the inner class can only be constructed from within the outer class.
From within the package bar, an instance of the inner class can be constructed with “new inner()”
第22题:
Compilation fails.
The code compiles and the output is 2.
If lines 16, 17 and 18 were removed, compilation would fail.
If lines 24, 25 and 26 were removed, compilation would fail.
If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.
If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.
第23题:
A Bar is a Baz.
A Foo has a Bar.
A Baz is a Foo.
A Foo is a Baz.
A Baz has a Bar.
第24题:
Baz has the value of 0
Baz has the value of 1
Baz has the value of 2
An exception is thrown.
The code will not compile.