//Kotlinclass Utils privateconstructor(){companionobject{fungetScore(value: Int): Int {return2* value
}}}// 或者object Utils {fungetScore(value: Int): Int {return2* value
}}
//Javafinalint andResult = a & b;finalint orResult = a | b;finalint xorResult = a ^ b;finalint rightShift = a >>2;finalint leftShift = a <<2;finalint unsignedRightShift = a >>>2;
//kotlinval andResult = a and b
val orResult = a or b
val xorResult = a xor b
val rightShift = a shr2val leftShift = a shl2val unsignedRightShift = a ushr2
2.16 换行
//JavaString text ="First Line\n"+"Second Line\n"+"Third Line";
//kotlinval text ="""
|First Line
|Second Line
|Third Line
""".trimMargin()