aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java is zero indexed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java is zero indexed" Watch "Java is zero indexed" New topic
Author

Java is zero indexed

Saibabaa Pragada
Ranch Hand

Joined: Oct 24, 2010
Posts: 162
Hi, I want to know the reason why Java arrays/Collections framework classes are zero-indexed. Please let me know.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4544
    
    5

Because the JLS says so.
http://java.sun.com/docs/books/jls/third_edition/html/arrays.html


luck, db
There are no new questions, but there may be new answers.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Most languages are.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Trivikram Kamat
Ranch Hand

Joined: Sep 26, 2010
Posts: 155
There is a mathematical reason behind it also:
Why the Array Index should start from 0


OCPJP6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java is zero indexed