day04-方法_重载练习
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
package com.inmind.method;
|
||||||
|
|
||||||
|
public class Demo06 {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
下列哪些函数和给定方法重载了。
|
||||||
|
a.int show(int x,float y,char z)
|
||||||
|
|
||||||
|
b.void show(float b,int a,char c)
|
||||||
|
|
||||||
|
c.void show(int c,float a,char b)
|
||||||
|
|
||||||
|
d.void show(int a,int b,int c)
|
||||||
|
|
||||||
|
e.double show()
|
||||||
|
*/
|
||||||
|
|
||||||
|
void show(int a,float b,char c)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
double show(){//方法重载
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void show(int a,int b,int c){//方法重载
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*void show(int c,float a,char b){ 不是重载
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
void show(float b,int a,char c){//方法重载
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*int show(int x,float y,char z){ 不是重载
|
||||||
|
return 0;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user