From 5e86d6622175c98230443f7e435d2854fdd67324 Mon Sep 17 00:00:00 2001 From: xuxin <840198532@qq.com> Date: Thu, 17 Sep 2026 16:07:02 +0800 Subject: [PATCH] =?UTF-8?q?day04--=E6=96=B9=E6=B3=95=5F=E9=87=8D=E8=BD=BD?= =?UTF-8?q?=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day04/src/com/inmind/method01/Test06.java | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 day04/src/com/inmind/method01/Test06.java diff --git a/day04/src/com/inmind/method01/Test06.java b/day04/src/com/inmind/method01/Test06.java new file mode 100644 index 0000000..e64c79a --- /dev/null +++ b/day04/src/com/inmind/method01/Test06.java @@ -0,0 +1,54 @@ +package com.inmind.method01; +/* + * 方法重载:两同一不同 + * 1.同一类中 + * 2.方法名相同 + * 3.参数列表不同(参数列表的个数,数据类型,参数的顺序) + +class Demo +{ + void show(int a,float b,char c) + { + + } +} + +下列哪些方法和指定的方法重载了。 +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() + */ +public class Test06 { + + void show(int a,float b,char c) + { + + } + + //a + /*int show(int x,float y,char z){ + return 1; + }*/ + + //b + void show(float b,int a,char c){ + + } + + //c +// void show(int c,float a,char b){} + + void show(int a,int b,int c){ + + } + + double show(){ + return 0.0; + } +}