1、通配符导入:Wildcardimportsimportjava.util._2、占位符语法:PlaceholdersyntaxList(1,2,3)map(_+2)3、临时变量(Ignoredvariables),高阶类型参数临时参数:Ignoredparameters//访问元组:tuplegetters(1,2)._24、通配模式:WildcardpatternsSome(5)match{caseSome(_)=>println("Yes")}match{caseList(1,_,_)=>" a list with three element and the first element is 1"caseList(_*)=>" a list with zero or more elements "caseMap[_,_]=>" matches a map with any key type and any value type "case_=>}val(a,_)=(1,2)for(_<-1to10)5、连接字母和标点符号:Joiningletterstopunctuationdefbang_!(x:Int)=56、偏应用函数:Partiallyappliedfunctions7、初始化默认值:defaultvaluevari:Int=_8、参数序列:parametersSequence_*作为一个整体,告诉编译器你希望将某个参数当作参数序列处理。例如vals=sum(1to5:_*)就是将1to5当作参数序列处理。//Range转换为ListList(1to5:_*)//Range转换为VectorVector(1to5:_*)