下面哪个方法不是Object类中定义的( )。
A: public boolean equals()
B: public String toString()
C: public int compareTo()
D: public int hashCode()
A: public boolean equals()
B: public String toString()
C: public int compareTo()
D: public int hashCode()
举一反三
- 下面哪个方法不是Object类中定义的方法?( ) A: public boolean equals(Object obj) B: public int compareTo() C: public String toString() D: public int hashCode()
- Which method will complete this class?() A: public int compareTo(Object o){/* more code here */} B: public int compareTo(Score other){/* more code here */} C: public int compare(Score s1, Score s2){/* more code here */} D: public int compare(Object o1, Object o2){/* more code here */}
- 以下哪个选项可以创建目录? A: public Boolean mkdir() B: public String [] list() C: public File [] listFiles() D: public Int List()
- 定义如下方法,下面选项中()错误的实现对该方法的重载。public static String do(int n,String s){......} A: public static int do(int num,String s){......} B: public static String do(String s,int n){......} C: public static void do(String s,int value) {......} D: public static void do(){......}
- 下面( )方法是public void example(){}的重载方法。 A: private String example(){} B: public int example(String str){} C: public void example2(){} D: public int example(int m,float f){}