when trying to make a call to the method
there is confusion to the compiler because byte method is also there and int method is also there
and compiler does not know which method to choose
always remember that if same method signature is not found
also widening is not found var arg method is chosen at the last
SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right
a byte is also an int (just smaller in memory). b1 is a literal and refers to an integer type so the compiler is getting confused as to which method to call. I think there is some implicit conversion going on or similar. Of course I may well be off, but that's my understanding.
be a well encapsulated person, don't expose your privates, unless you public void getWife()!
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss