Camel case in JavaJava follows the camel-case syntax for naming the classes, interfaces, methods, and variables. If the name is combined with two words, the second word will start with uppercase letter always, such as maxMarks( ), lastName, ClassTest, removing all the whitespaces. There are two ways of using Camel case:
Converting a normal string into camel case A string can be converted into either the lower or upper camel case convention just by removing the spaces from the string. Lower Camel Case Example: Input: JavaTpoint is the best tutorial site for programming languages. Output: javaTpointIsTheBestTutorialSiteForProgrammingLanguages. Upper Camel Case Example: Input: this is the java tutorial Output: ThisIsTheJavaTutorial Algorithm:
Let's implement the algorithm in a Java program. A. Converting String to Lower Camel CaseLowerCamel.java Output: maxMarks() lastName javaTpointIsTheBestTutorialSiteForProgrammingLanguages. B. Converting String to Upper Camel CaseUpperCamel.java Output: ClassTest Employee ThisIsTheJavaTutorial |