The traditional usage of instanceof operator requires typecasting inside the if block, i.e., if (obj instanceof String) { String s = (String) obj; ... } Though the block inside if gets executed only if obj X is a type of String object, the ja...

Markdown supported · ⌘↵ to post
No responses yet.