weird naming convention of substring() method of java.lang.String class

The substring() method of java.lang.class is not inline with the Java naming conventions for methods.

As per Java naming conventions, all the methods will be in camelCase.But this does not bother substring() method.

To get sub string of any string in Java, we should use substring() NOT subString().

PS: I remember there are some other capitalization styles other than camelCase and PascalCase but could not recollect them at this moment.

Published by Chaitanya

I am a family man, perpetual learner, coffee drinker, dessert eater and Happiness Engineer at Automattic. I also read, write, move, and meditate.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: