We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 115a52a commit 2610176Copy full SHA for 2610176
core-java/src/test/java/com/baeldung/keyword/test/InstanceOfUnitTest.java
@@ -35,6 +35,12 @@ public void giveWhenTypeIsInterface_thenReturnTrue() {
35
Circle circle = new Circle();
36
Assert.assertTrue("circle is instance of Shape", circle instanceof Shape);
37
}
38
+
39
+ @Test
40
+ public void giveWhenTypeIsOfObjectType_thenReturnTrue() {
41
+ Thread thread = new Thread();
42
+ Assert.assertTrue("thread is instance of Object", thread instanceof Object);
43
+ }
44
45
@Test
46
public void giveWhenInstanceValueIsNull_thenReturnFalse() {
0 commit comments