首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Dddd
掘友等级
董事长
获得徽章 0
动态
文章
专栏
沸点
收藏集
关注
作品
赞
299
文章 298
沸点 1
赞
299
返回
|
搜索文章
赞
文章( 298 )
沸点( 1 )
笑一笑
object B01 { def main(args: Array[String]): Unit = { var sum =0 var i =1 while(i<=100){ sum=sum+i i+
兄弟依旧多的不说少的不唠
``` object bo1 { def main(args: Array[String]): Unit = { while(true){ print("请输入要判断的年份(输入0就结束判断):“")
参数的定义
``` object untitled { //gender: def greet(name:String="笑一笑",age:Int=91,gender:String="男"):Unit={ pri
兄弟没毛
``` object B03 { def greet():Unit={ println(s"hahahaa~~~") } def main(args:Array[String]):Unit={ gre
一字饿
``` object B04 { def greet(name:String,score:Int*):Unit={ var total:Double=0 for(i<-score){ total+=1
卤味
``` object B05 { def sum(n:Int): Int={ if (n==1){ 1 }else{ sum(n-1)+n } } def main(args:Array[String
兄弟闹他
object practice16 { // 汉诺塔递归实现 // n: 圆盘数量 // a: 起始柱 // b: 辅助柱 // c: 目标柱 def f(n: Int, a: String, b:
兄弟上课认真一字学
``` object base43 { /* * 函数字面量 * 另一种定义函数的方式 */ // 定义函数的方式一:def def getSum(x: Int, y: Int): Int = { x
互关互赞互助
/* 类使属性的集合 Student,构造函数用来创建对象的 辅助构建函数,提供多种创建对象的方式 */ class Student(var name:String,var age:Int) { pr
一头鹿拿个钢管
object magic { val f1:(Int,Int) =>Int =+ val f2:(Int,Int) =>Int=+ def test(fn:(Int,Int)=>Int,x:Int,y
下一页
个人成就
文章被点赞
177
文章被阅读
242
掘力值
329
关注了
23
关注者
17
收藏集
0
关注标签
0
加入于
2025-09-03