Have a closer look at the method you think you're using. I think it's fair to say that this is an example of Java's core library breaking its own naming conventions. I wasn't surprised to see this method dates back to Java 1.0 - there were a few dodgy decisions made early on that are difficult to fix without breaking backwards compatibility.
Henry Wong wrote:The message is pretty clear. It is saying that there is no such a thing as an arrayCopy() method of the System class, that takes those five parameters.
@Krishnaveni: And you know what? I'd probably have run into that one too if I still compiled from the command line (which is good practise; don't get me wrong), because it's an old method that doesn't follow Sun's own "camel-case" guidelines.
The main lesson here: When you get a message like that, look at the docs carefully (character by character, if you have to), because Henry's quite right: the message tells you exactly what's wrong.
[Edit] Too late.
Isn't it funny how there's always time and money enough to do it WRONG?
Mansukhdeep Thind wrote:Why is it so? Can't it be rectified to System.arrayCopy(....)? Or is the impact on dependent classes simply overwhelming?
Changing it would break any code that already uses it - and since it's been there since the beginning that's potentially a lot of code - and an unknown amount.
What they could do is mark arraycopy as deprecated, and introduce a new arrayCopy method that does the same thing (you'd probably change arraycopy to just call arrayCopy). That would be safe. But the question is whether it's worth it and whether it will just cause more confusion.