摘要:
函数定义使用fun关键字,参数格式为 参数:类型 fun greet( ){ println("hello name") } 表达式作为函数体返回,返回类型自动推断 fun sum1(a:Int,b:Int)=a+b 表达式作为函数体返回,public则必须写明返回类型(验证不写明返回类型也可以) 阅读全文
posted @ 2019-05-10 11:38
endian11
阅读(133)
评论(0)
推荐(0)

浙公网安备 33010602011771号