11.Giving the following definition:public class Upton{publicstatic void main(String argv[]){ }public void amethod(int i){}//Here}After //Here,which statement is legal:a) publicint amethod(int z){ return 99; }b) publicint amethod(int i,int j){return 9
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 13:20:03
11.Giving the following definition:public class Upton{publicstatic void main(String argv[]){ }public void amethod(int i){}//Here}After //Here,which statement is legal:a) publicint amethod(int z){ return 99; }b) publicint amethod(int i,int j){return 9
11.Giving the following definition:
public class Upton{
publicstatic void main(String argv[]){
}
public void amethod(int i){}
//Here
}
After //Here,which statement is legal:
a) publicint amethod(int z){ return 99; }
b) publicint amethod(int i,int j){return 99;}
c) voidamethod(long l){ return 99}
d) privateint anothermethod(){}
11.Giving the following definition:public class Upton{publicstatic void main(String argv[]){ }public void amethod(int i){}//Here}After //Here,which statement is legal:a) publicint amethod(int z){ return 99; }b) publicint amethod(int i,int j){return 9
B·······················
A:方法名和传参重复
C:多了return
D:少了return