is=> instanceof(JLS参考),像这样:
Object foo = "hello";
if (foo instanceof String) {
// Yup, it's a string
}
Run Code Online (Sandbox Code Playgroud)
as在Java中没有C#的运算符.
| 归档时间: |
|
| 查看次数: |
181 次 |
| 最近记录: |