18

Java's standard libraries seem to use camelCase for method names. Native functions like nanoTime() are no exceptions.

If so, why is System.arraycopy not camelCased?

Is there something special about System.arraycopy?

3
  • 2
    I suspect there is no reason other than someone failed to enforce standards and inconsistency crept in. But it would be interesting if it signified something else. Commented Dec 7, 2011 at 19:19
  • 7
    I have the same question about Hashtable. There is HashMap, ArrayList, LinkedList, LinkedHashMap, HashSet, TreeMap, TreeSet, PriorityQueue.....why not HashTable? Commented Dec 7, 2011 at 19:20
  • 13
    it's something that can be hashted. Commented Dec 7, 2011 at 19:55

1 Answer 1

31

It's been in Java for before v1.0 was released - so my guess is that it predates the naming conventions, and it was missed in a sweep of the API when the naming conventions were decided.

(In other news, NullPointerException should be called NullReferenceException.)

Sign up to request clarification or add additional context in comments.

7 Comments

I dont think so. There is System.getenv() which was added in JDK 1.5
@Nerdtron: Assuming you mean a direct address in memory, it doesn't have to be. Have a look at wikis.sun.com/display/HotSpotInternals/CompressedOops for example.
@Kowser, getenv is as ancient as arraycopy
@Kowser: An overload was added in JDK 1.5, but System.getenv(String) was present in 1.0.2: web.mit.edu/java_v1.0.2/www/javadoc/java.lang.System.html#_top_
@Pacerier: That's a little more forgivable; sometimes they're called "hash-tables" or even just "hashtables" in normal language. Not very much, admittedly. But note how Microsoft followed suit on that one :)
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.