Code example for ArrayStoreException

0
     * @param harness  the test harness (<code>null</code> not permitted). 
     */ 
    public void test(TestHarness harness) 
    { 
        // create instance of a class ArrayStoreException 
        ArrayStoreException o = new ArrayStoreException("java.lang.ArrayStoreException"); 
 
        // basic check of instanceof operator 
        harness.check(o instanceof ArrayStoreException); 
 
        // check operator instanceof against all superclasses 
        harness.check(o instanceof RuntimeException); 
        harness.check(o instanceof Exception); 
        harness.check(o instanceof Throwable); 
        harness.check(o instanceof Object); 
    } 
} 
 
Experience pair programming with AI  Get Codota for Java