What will happen if you attempt to compile and run the following code?
1) 19 followed by 20
2) 19 followed by 11
3) Compile time error
4) 10 followed by 1
When I compiled i got the output as option 2(19 followed by 11).
But actual answer given is as below:
Compile time error
The wrapper classes cannot be used like primitives.
Depending on your compiler you will get an error that says someting like "Error: Can't convert
java lang Integer". Wrapper classes have similar names to primitives but all start with upper case letters.
Thus in this case we have int as a primitive and Integer as a wrapper. The objectives do not specifically mention the wrapper classes but don't be surprised if they come up.
It would be nice if someone explain me about this.