answersLogoWhite

0


Best Answer

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);

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the capitalized keywords in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Do keywords have to be capitalized?

No, keywords do not have to be capitalized.


What are the keywords not used in java?

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.


What are user defined keywords in java?

As far as I know, keywords are part of the implementation of Java, and cannot be defined or redefined.


How many keywords in java 1.6?

As of Java 1.5, there are 50 keywords defined, 48 of which are used (const and goto are unusable keywords).abstractcontinuefornewswitchassertdefaultgotopackagesynchronizedbooleandoifprivatethisbreakdoubleimplementsprotectedthrowbyteelseimportpublicthrowscaseenuminstanceofreturntransientcatchextendsintshorttrycharfinalinterfacestaticvoidclassfinallylongstrictfpvolatileconstfloatnativesuperwhile


Does Google queries keywords have to be capitalized?

No. Queries do not need to be capitalized.


What is the case for Java keywords?

uppercase


Are true false and null Java keywords?

True and false are literals(special built-in value) in java and cannot be used as keywords.


Are keywords also known as metadata?

No. Keywords are not called or known as Metadata in Java


What is the meaning of new keyword 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)


Scanf in java?

There is no scanf in Java. It is one of the keywords used in C Programming language


What does the verify keyword do in Java?

"verify" is not a Java keyword. I believe the link, in related links, has the complete list of Java keywords.


What is the return type of finally method in java?

The final and finally keywords have no impact on the return type of a method in Java.