java - Why widening beats both Boxing and var-args in Overloading of a method? -


I am preparing for a SCJP exam and when I am studying a wide area, it has been given that it is wide After being overloaded, there was no clear explanation of boxing and war - but tried to find a better answer.

I got an answer because the compiler chooses the old style before choosing a new style. But I'm not sure.

Edit: I know frameworks are preferrd compared to boxing and var-args. But why is my question from which I know one other reason.

Yes, the compiler "chooses the old style on the new style", because compatibility requirements imagine some code Do, which was written before Java 5, when there was a sudden change when compiled under Java 5! It would be bad

Conversions have been increasing since the beginning of Java, but AutoBoxing and Classes are new in Java 5.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -