I have a class :
class Employee{...} then :
Employee aEmployee = new Employee(...); int i = 10; String str = aEmployee + i; it generates a ERROR when compiled, Why ?
EDIT: I didn't override the toString() method in the Employee class, but if I try this:
Employee aEmployee = new Employee(...); String h = "hello"; String str = aEmployee + h; this time will be fine, both compiling and running.
So: why is it OK after changing the int variable i to a String variable h?
Employeeclass.