Whatever you like it to be, just be consistent. ID is not a word, it's an abbreviation of identity. How to write abbreviations is something people argue about for a long time. E.g. is it
getResourceURL
or
getResourceUrl
actually both can be found in use in different frameworks. Another popular abbr. with similar problem is UTF8.
It's just important to be consistent, because otherwise people always have to look up the correct capitalization for every method, if every method handles it in a different way.
I have my own convention for that. If the abbr. is at the end of the name, it is all capitalized, if it's somewhere else, it follows camel notation rules. E.g.
getResourceURL
urlOfResource
compareUrlToString
Why? I like abbr. to be capitalized. Most people expect URL or UTF to be capitalized. However, if in the middle of a name, it destroys the advantage of camel notation. The advantage of camel notation is that you see where a new word starts by capitalization. So compare:
compareURLToString
compareUrlToString
In the first case, I don't see immediately the URL is one word and To is the next one. The T might be part of URL (URLT) and be a different abbr., thus I'll use the second form. If it's at the end however, it won't play a role, no other word follows, thus I prefer the capitalized form. I stick to this convention throughout all of my code.