public static String capitalizeString(String string) {
char[] chars = string.toLowerCase().toCharArray();
boolean found = false;
for (int i = 0; i < chars.length; i++) {
if (!found && Character.isLetter(chars[i])) {
chars[i] = Character.toUpperCase(chars[i]);
found = true;
} else if (Character.isWhitespace(chars[i]) chars[i]=='.' chars[i]=='\'') { // You can add other chars here
found = false;
}
}
return String.valueOf(chars);
}
You can find a list of Java keywords in the Wikipedia article "List of Java keywords". These keywords may not be used for variables or other user-defined names.
As of Java 1.5, there are 50 keywords defined, 48 of which are used (const and goto are unusable keywords).abstractcontinuefornewswitchassertdefaultgotopackagesynchronizedbooleandoifprivatethisbreakdoubleimplementsprotectedthrowbyteelseimportpublicthrowscaseenuminstanceofreturntransientcatchextendsintshorttrycharfinalinterfacestaticvoidclassfinallylongstrictfpvolatileconstfloatnativesuperwhile
uppercase
True and false are literals(special built-in value) in java and cannot be used as keywords.
No. Keywords are not called or known as Metadata in Java
No, keywords do not have to be capitalized.
You can find a list of Java keywords in the Wikipedia article "List of Java keywords". These keywords may not be used for variables or other user-defined names.
As far as I know, keywords are part of the implementation of Java, and cannot be defined or redefined.
As of Java 1.5, there are 50 keywords defined, 48 of which are used (const and goto are unusable keywords).abstractcontinuefornewswitchassertdefaultgotopackagesynchronizedbooleandoifprivatethisbreakdoubleimplementsprotectedthrowbyteelseimportpublicthrowscaseenuminstanceofreturntransientcatchextendsintshorttrycharfinalinterfacestaticvoidclassfinallylongstrictfpvolatileconstfloatnativesuperwhile
No. Queries do not need to be capitalized.
uppercase
True and false are literals(special built-in value) in java and cannot be used as keywords.
No. Keywords are not called or known as Metadata in Java
There is 48 reserved keywords currently defined in the java language. These keywords, combined with the syntax of the operators and separators,form the definition of the java language. these keywords can't be used as names for a variable,class or method. (chandramohan singh)
There is no scanf in Java. It is one of the keywords used in C Programming language
"verify" is not a Java keyword. I believe the link, in related links, has the complete list of Java keywords.
The final and finally keywords have no impact on the return type of a method in Java.