type/2 (i,io)
This predicate returns in the second argument the name of the Java class of the object supplied as input in the first argument. The output may already be set to a String value, which will then return success if the class name of the supplied object matches that string.
The following fragment will print the name of the ArrayList class..
This prints
Labels: