1. package foo; 2. 3. import java.util.Vector; 4. 5. protected class MyVector Vector { 6. init i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11. 12. public class MyNewVector extends MyVector { 13. public MyNewVector() { 14. i = 4; 15. } 16. public static void main(String args[]) { 17. MyVector v = new MyNewVector(); 18. } 19. } What is the result?()
第1题:
Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()
第2题:
package foo; public class Outer ( public static class Inner ( ) ) Which statement is true? ()
第3题:
class Foo { private int x; publicFoo(intx) {this.x=x; } public void setX( int x) { this.x = x; } public int getX() { return x; } } public class Gamma { static Foo fooBar( Foo foo) { foo = new Foo( 100); return foo; } public static void main( String[] args) { Foo foo = new Foo( 300); System.out.print( foo.getX() + “-“); Foo fooFoo = fooBar( foo); System.out.print( foo.getX() + “-“); System.out.print( fooFoo.getX() + “-“); foo = fooBar( fooFoo); System.out.print( foo.getX() + “-“); System.out.prmt( fooFoo.getX()); } } What is the output of this program?()
第4题:
foo对象有att属性,那么获取att属性的值,以下哪些做法是可以的?()
第5题:
console.log(foo);varfoo="foo!";console.log(foo);执行上面代码,控制台会输出()。
第6题:
Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?()
第7题:
Given: 1.<% int[] nums = {42,420,4200}; 2.request.setAttribute("foo", nums); %> 3.${5 + 3 lt 6} 4.${requestScope[’foo’][0] ne 10 div 0} 5. ${10 div 0} What is the result?()
第8题:
Foo has the value of “”
Foo has the value of null.
Foo has the value of “blue”
Foo has the value of “green”
An exception is thrown.
The code will not compile.
第9题:
float foo = -1;
float foo = 1.0;
float foo = 42el:
float foo = 2.02f:
float foo = 3.03d:
第10题:
${func(1)}
${foo:func(4)}
${func:foo(2)}
${foo(5):func}
${func:foo(“easy”)}
${func:foo(“3”).name}
第11题:
Float foo = -1;
Float foo = 1.0;
Float foo = 42e1;
Float foo = 2.02f;
Float foo = 3.03d;
Float foo = 0x0123;
第12题:
public void foo() { }
public int foo() { return 3; }
public Two foo() { return this; }
public One foo() { return this; }
public Object foo() { return this; }
第13题:
Which the three are valid declarations of a float?()
第14题:
Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map,which two are valid invocations of function foo?()
第15题:
Which three are valid declarations of a float? ()
第16题:
下面选项中哪一个是和$("#foo")等价的写法()。
第17题:
1. class SuperFoo { 2. SuperFoo doStuff(int x) { 3. return new SuperFoo(); 4. } 5. } 6. 7. class Foo extends SuperFoo { 8. //insert code here 9. } 下面哪三项分别插入到第8行,可以编译?()
第18题:
String foo = “blue”; Booleanbar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result?()
第19题:
int doStuff() { return 42; }
int doStuff(int x) { return 42; }
Foo doStuff(int x) { return new Foo(); }
SuperFoo doStuff(int x) { return new Foo(); }
第20题:
java Commander
java com.sim.sjcp.Commander
java com/sun/sjcp/Commander
java-cpcom.sun.sjcp Commander
java-cpcom/sun/sjcp Commander
第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.
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 be constructed only from within the Outer class.
From within the package foo, and instance of the Inner class can be constructed with “new Inner()”.
第23题:
java Commander
java com. sim. sjcp.Commander
java com/sun/sjcp/Commander
java -cp com.sun.sjcp Commander
java -cp com/sun/sjcp Commander
第24题:
$(“foo#”)
$(“foo”)
$(“.foo”)
jquery(“#foo”)