It seems the definition of weak typing (not to be confused with dynamic typing) is that a binary operator can work when both values are a different type.
Python programmers argue that Python is strongly typed because 1+"hello" will fail instead of silently doing something else. In contrast, other languages which are commonly considered weakly typed (e.g. PHP, JavaScript, Perl) will silently convert one or both of the operands. For example, in JavaScript, 1+"hello" -> "1hello", while in Perl, 1+"hello" -> 1, but 1+"5" -> 6.
Now, I had the impression that Java is considered a strongly typed language, yet auto(un)boxing and widening conversions seem to contradict this. For example, 1+new Integer(1) -> 2, hello+"1" -> "hello1", 'A'+1 -> 66, and long can be converted into float automatically even though it typically gets truncated. Is Java weakly typed? What's the difference between weak typing, autoboxing, and widening conversions?
Weak Typing is when certain conversions and ad-hoc polymorphisms are implicitly performed if the compiler/interpreter feels the need for it.
Autoboxing is when when literals and non-object types are automatically converted to their respective Object types when needed. (For example, Java will allow you to call methods on a string literal as if it were a string object.) This has nothing to do with the typing system. It's really just syntactic sugar to avoid having to create objects explicitly.
Widening conversions are a form of weak typing. In a very strict strongly typed language, this wouldn't be allowed. But in languages like Java, it is allowed because it has no negative side effects. Something as tiny as this is hardly enough to no longer consider Java a strongly typed language.
Java also overloads the + operator for string concatenation. It's definitely a feature seen in weakly typed languages, but again, not a big enough deal to call Java weakly typed. (Even though I think it's a really stupid idea.)
What is the difference between weak typing, autoboxing, widening conversions?