最好能说点为什么,嫌麻烦光给答案也行,谢谢大家了。21) Which of the following statements are true?
1) The default constructor has a return type of void
2) The default constructor takes a parameter of void
3) The default constructor takes no parameters
4) The default constructor is not created if the class has any constructors of its own.22)Which of the following statements are true?
1) All of the variables in an interface are implicitly static
2) All of the variables in an interface are implicitly final
3) All of the methods in an interface are implicitly abstract
4) A method in an interface can access class level variables23)Which of the following statements are true?
1 ) The String class is implemented as a char array, elements are addressed using the stringname[] convention
2) The + operator is overloaded for concatenation for the String class
3) Strings are a primitive type in Java and the StringBuffer is used as the matching wrapper type
4) The size of a string can be retrieved using the length property24) Which of the following statements are true?
1) A method in an interface must not have a body
2) A class may extend one other class plus at most one interface
3) A class may extends at most one other class plus implement many interfaces
4) An class accesses an interface via the keyword uses25) Which of the following statements are true?
1) The following statement will produce a result of 1. System.out.println( -1 >>>2);
2) Performing an unsigned left shift (<<<) on a negative number will always produce a negative number result
3) The following statement will produce a result of zero, System.out.println(1 >>1);
4) All the integer primitives in java are signed numbers26) Which of the following statements are true?
1) The elements in a Java array can only be of primitive types, not objects
2) Arrays are initialized to default values wherever they are created
3) An array may be dynamically resized using the setSize method
4) You can find out the size of an array using the size method27) Given the following class
public class Ombersley{
public static void main(String argv[]){
boolean b1 = true;
if((b1 ==true) || place(true)){
System.out.println("Hello Crowle");
}
}
public static boolean place(b public static boolean place(boolean
location){
if(location==true){
System.out.println("Borcetshire");
}
System.out.println("Powick");
return true;
}
}
What will happen when you attempt to compile and run it?
1) Compile time error
2) Output of "Hello Crowle"
3) Output of Hello Crowle followed by Borcetshire and Powick
4) No output28) You are given a class hierarchy with an instance of the class Dog. The class Dog is a child of mammal and the class
Mammal is a child of the class Vertebrate. The class Vertebrate has a method called move which prints out the string
"move". The class mammal overrides this method and prints out the string "walks". The class Dog overrides this method
and prints out the string "walks on paws". Given an instance of the class Dog,. how can you access the ancestor method
move in Vertebrate so it prints out the string "move";
1) d.super().super().move();
2) d.parent().parent().move();
3) d.move();
4) none of the above;29) Which of the following most closely describes the process of overriding?
1) A class with the same name replaces the functionality of a class defined earlier in the hierarchy
2) A method with the same name completely replaces the functionality of a method earlier in the hierarchy
3) A method with the same name but different parameters gives multiple uses for the same method name
4) A class is prevented from accessing methods in its immediate ancestor30) Which of the following statements are true?
1) The % is used to calculate a percentage thus: 10 % 20=50
2) The / operator is used to divide one value by another
3) The # symbol may not be used as the first character of a variable
4) The $ symbol may not be used as the first character of a variable

解决方案 »

  1.   

    kingfish(POWER OF JAVA) ( ) 信誉:115  2005-08-24 19:24:00  得分: 0  
     
     
       晕,题给你你还找人做, 难道你进去做领导的?
      
     
    ---------------------------
    嘘~小声点,lz说不定是哪位老大的公子,小心人家派人追杀你
      

  2.   

    很明显,出题的人也是抄别人考试的题目,所以你用 Google 也很有可能得到答案。