1. def matchConstant(x:Any):String={
    2. x match {
    3. case "a" => "hello"
    4. case false => "xixi"
    5. case 1 => "yes"
    6. case 0.0 => "no"
    7. case '+' => "Char +"
    8. case _ => "nothing"
    9. }
    10. }