I came across an example in the OCJP book. It says
Integer y=new Integer("20");
y++; (un-wraps it)
System.out.println(y);
Now, this would print 21. Hence, it makes me think, how did the compiler even know that at y++
it should unwrap it to int and increment it? Integer is just a normal class(may is say Wrapper class??), is it operator overloading that is inbuilt inside?
Is there a way I can do this for my own custom class if possible?