发布网友 发布时间:2022-04-24 10:00
共1个回答
热心网友 时间:2023-10-09 15:30
JavaSystem.out.print("AmitShekhar");System.out.println("AmitShekhar");Kotlinprint("AmitShekhar")println("AmitShekhar")JavaStringname="AmitShekhar";finalStringname="AmitShekhar";Kotlinvarname="AmitShekhar"valname="AmitShekhar"JavaStringotherName;otherName=null;KotlinvarotherName:String?otherName=nullJavaif(text!=null){intlength=text.length();}Kotlintext?.let{vallength=text.length}JavaStringfirstName="Amit";StringlastName="Shekhar";Stringmessage="Mynameis:"+firstName+""+lastName;KotlinvalfirstName="Amit"vallastName="Shekhar"valmessage="Mynameis:$firstName$lastName"JavaStringtext="FirstLine\n"+"SecondLine\n"+"ThirdLine";Kotlinvaltext="""|FirstLine|SecondLine|ThirdLine""".trimMargin()JavaStringtext=x>5?"x>5":"x5)"x>5"else"x=0&&score<=300){}Kotlinif(scorein0..300){}