Skip to content

Commit bb7d639

Browse files
author
crazy
committed
test interface
1 parent 9a1dd5e commit bb7d639

5 files changed

Lines changed: 49 additions & 14 deletions

File tree

JavaBase/.classpath

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5-
<classpathentry kind="lib" path="D:/Program Files/eclipse/lombok.jar"/>
6-
<classpathentry kind="output" path="bin"/>
7-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="lib" path="D:/eclipse/lombok.jar"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.java1995.banksystem;
2+
/*
3+
* 此为农业银行银联接口
4+
* @author crazyxia
5+
*
6+
*/
7+
public interface IABC extends IUnionpay {
8+
public void cellPhonePay();
9+
//定义一个电话支付功能
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.java1995.banksystem;
2+
/*
3+
* 此为工商银行银联接口
4+
* @author crazyxia
5+
*
6+
*/
7+
public interface IICBC extends IUnionpay{
8+
//在满足银联接口的规则基础上(继承了银联接口),增加了在线支付功能。
9+
public void onlinePay(double money);
10+
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.java1995.banksystem;
2+
3+
/*
4+
* 此为银联接口
5+
* @author crazyxia
6+
*
7+
*/
8+
public interface IUnionpay {
9+
public void testPassword(String keyword);//定义密码检测的抽象方法
10+
public void drawMoney(double money);//定义取钱的抽象方法
11+
public void checkBalance(double balance);//定义查询余额的抽象方法
12+
13+
14+
}

JavaBase/src/com/xinan/array/TestArray01.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.xinan.array;
22

3-
/**本程序是测试数组相关知识
3+
/**本程序是测试数组相关知识
44
* @author crazyxia
55
*
66
*/
@@ -9,20 +9,20 @@ public class TestArray01 {
99
public static void main(String[] args){
1010

1111
/*
12-
* 数组有两种定义形式
12+
* 数组有两种定义形式
1313
* eg:
1414
* int[] scores=new int[5];
1515
* int[] scores={45,48,97,89};
1616
*/
17-
String[] scores={"oracle","java","web"};//数组的第一种写法,其错误写法:String[] scores=new String{"oracle","java"};
18-
//正确写法:String[] scores=new String[] {"oracle","java","web"}
19-
int[] ages=new int[5];//数组的第二种数组写法
17+
String[] scores={"oracle","java","web"};//数组的第一种写法,其错误写法:String[] scores=new String{"oracle","java"};
18+
//正确写法:String[] scores=new String[] {"oracle","java","web"}
19+
int[] ages=new int[5];//数组的第二种数组写法
2020
ages[0]=5;
2121
ages[1]=7;
2222
ages[2]=9;
23-
//数组的遍历
23+
//数组的遍历
2424
for(int i=0;i<=2;i++){
25-
System.out.println(ages[i]);//使用for循环遍历数组中元素
25+
System.out.println(ages[i]);//使用for循环遍历数组中元素
2626
}
2727

2828
System.out.println(scores[2]);

0 commit comments

Comments
 (0)