File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes arraycopy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "arraycopy" Watch "arraycopy" New topic


Struan Kay

Joined: May 20, 2004
Posts: 3
This is probably just a 'because it is.' type question but is there any reason why the arraycopy method is in the java.lang.System class not java.util.Arrays and why isn't the c uppercase?


Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Stuff in the java.lang.System class is pretty much the first defined in Java, and it predates java.lang.Arrays. I think because it came out first it is now pretty fundamental to so many Java programs that there is little chance for Sun to deprecate it.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
So, if you were curious if there existed some well thought out design considerations behind this situation, the answer is, "Probably not."

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
...and why isn't the c uppercase?

There may well exist some "historic" reason for it (e.g. something in the C or C++ programming language standard library with the same name and a similar function), but I'm not aware of such a thing.

I'd guess that someone just wasn't following the current naming conventions, and then it was too late to change, without affecting substantial existing code.
[ May 27, 2004: Message edited by: Dirk Schreckmann ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
or maybe they wanted to have some exceptions to the rule to make the certification exam more "interesting"

I agree. Here's the link:
subject: arraycopy
It's not a secret anymore!