Snippets tagged “type-checking”
3 snippets use this tag.
- How to check type of variable in Java?Java
To check the type of a variable in Java, you can use the instanceof operator.
- How to Check Whether an Object is a DateJavaScript
Read this JavaScript tutorial and learn several ways that are used for checking whether the parameter passed to the method is of type Date object or not.
- What are the differences between type() and isinstance()?Python
In Python, type() is a built-in function that returns the type of an object, while isinstance() is a function that checks whether an object is an instance of a particular class or of a subclass thereof.