Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

instanceof java

@Test
public void givenWhenInstanceIsCorrect_thenReturnTrue() {
    Ring ring = new Ring();
    Assert.assertTrue(ring instanceof Round);
}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #instanceof #java
ADD COMMENT
Topic
Name
5+2 =