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

The sub­string() method of java.lang.class is not inline with the Java nam­ing con­ven­tions for meth­ods.

As per Java nam­ing con­ven­tions, all the meth­ods will be in camelCase.But this does not both­er sub­string() method.

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

PS: I remem­ber there are some oth­er cap­i­tal­iza­tion styles oth­er than camel­Case and Pas­cal­Case but could not rec­ol­lect them at this moment.


Comments

Leave a Reply

%d bloggers like this: