Code example for Field

Methods: getNamehashCode

            fail("NullPointerException expected but not thrown");
        assertTrue("NullPointerException expected but not thrown", thrown);
        // Test setting a static field; 
        f = x.getClass().getDeclaredField("intSField");
        f.setInt(null, Integer.MIN_VALUE);
        val = f.getInt(x);
        assertEquals("Returned incorrect int field value",
                Integer.MIN_VALUE, val);
     * @tests java.lang.reflect.Field#setLong(java.lang.Object, long) 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "setLong", 
        args = {java.lang.Object.class, long.class}
Connect your IDE to all the code out there  Get Codota for Java