Object str = new String("Hello"); if (str instanceOf String) {}→true if (str instanceOf Object) {}→true*javaの全てのクラスはObject型を継承しているので、~ instanceOf Objectはtrueになる。
Object str = new String("Hello"); if (str instanceOf String) {}→true if (str instanceOf Object) {}→true*javaの全てのクラスはObject型を継承しているので、~ instanceOf Objectはtrueになる。