2011年JAVA认证模拟题第二阶段(5)
Q13.Given the following class definition, which of the following methods could be legally placed after the comment //Here1. public class Rid {
2. public void amethod(int i, String s){}
3. //Here
4. }
a. public void amethod(String s, int i) {}
b. public int amethod(int i, String s) {}
c. public void amethod(int i, String mystring) {}
d. public void Amethod(int i, String s) {}
Q14.Given the following class definition, which of the following statements would be legal after the comment //Here
1. class InOut {
2. String s= new String(“Between”);
3. public void amethod(final int iArgs) {
4. int iam;
5. class Bicycle{
6. public void sayHello(){
7. //Here
8. } //End of bicycle class
9. }
10. } //End of amethod
2011年JAVA认证模拟题第二阶段(5)
</p> 11. public void another(){12. int iOther;
13. }
14. }
a. System.out.println(s);
b. System.out.println(iOther);
c. System.out.println(iam);
d. System.out.println(iArgs);
Q15.Which of the following methods are members of the Vector class and allow you to input a new element
a. addElement()
b. insert()
c. append()
d. addItem()
13. ad
14. ad
15. a
页:
[1]