Why S Is Capital in String in Java?

Why S Is Capital in String in Java?

Name of a class, which is case-sensitive, primitive types are lowercase. ... Because, by convention all class names in Java start with a capital letter, and String is a class. (The full name is java.

Why is String capitalized in Java?

The String type is capitalized because it is a class, like Object , not a primitive type like boolean or int (the other types you probably ran across). As a class, the String follows the Naming Convention for Java proposed by Sun.

Why String S is capital?

it is because Java is not a true OO language but (thankfully) an hybrid language that allows the use of primitives, which are close enough to the metal (not unlike C).

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.