instanceofとisInstance

  obj instanceof String

  String.class.isInstance(obj);

という書き方がある。通常はinstanceofでいけるけど、下の書き方も覚えておくと便利。な時があるかも。