下面( )方法是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){}
A: private String example(){}
B: public int example(String str){}
C: public void example2(){}
D: public int example(int m,float f){}
举一反三
- 下面( )函数是public void example(){...}的重载函数。 A: public void example( int m){...} B: public int example(){...} C: public void example2(){...} D: public int example ( int m, float f){...}
- 下面哪几个函数是public void example(){...}的重载函数? A: public void example( int m){...} B: public int example(){...} C: public void example2(){...} D: public int example (int m, float f){...}
- public class Example { String str = new String("Java"); StringBuffer sb = new StringBuffer("C#"); public void strcat(String str, StringBuffer sb) { str = str + " study"; sb = sb.append(" exam"); } public static void main(String args[]) { Example ex = new Example(); ex.strcat(ex.str, ex.sb); System.out.println(ex.str); System.out.println(ex.sb); }}程序的输出结果是:______
- 阅读下列程序public class Example public static void main(String[]
- 程序运行的结果是: good and gbc。( ) public class Example{ String str=new String(“good”); char[]ch={‘a’,'b’,'c’}; public static void main(String args[]){ Example ex=new Example(); ex.change(ex.str,ex.ch); System.out.print(ex.str+” and “); Sytem.out.print(ex.ch); } public void change(String str,char ch[]){ str=”test ok”; ch[0]=’g'; } }