黑马java基础篇day03

1.2.3.4.5.6.

Almost the same with C,so I wont't go into details.

One point is worthy to be mentioned,in java,& and | is legal,however,they are hardly used cuz they are inefficient for they execute every boolean expression,different from && that if the first one is false it will directly return false,|| goes similarily.

As for method,it is similar with function in C.

the form is

public static datatype name( ){

}

nothing or some formal parameters will go in the parentheses.

7.8.

Reload is an important concept in programming language.Legal reload means all methods share the same name,but things in their parentheses differ.

Cases below are all legal.(Let's assume the method name is add)

public static void add(int a,double b)

public static void add(int a,int b)

public static void add(double a,int b)

public static void add(doub;le a,double b)

Reload can avoid the trouble when naming the methods that almost do the same thing.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值