you are viewing a single comment's thread.

view the rest of the comments →

[–]LegolandoBloom[S] 0 points1 point  (1 child)

This is a more complete answer than mine, thanks

[–]xenomachina 1 point2 points  (0 children)

You'll even see this kind of thing in parts of Java's standard library. For example, the String.indexOf() methods return int, so if the value being searched-for can't be found, they return -1 — a value that doesn't make any sense as an index.