Answer to Question #70097 in Java | JSP | JSF for Matt

Question #70097
How can I compare two strings and capitalize the second one in the same places as the first one?
1
Expert's answer
2017-09-14T10:05:06-0400
You can hard code two arrays with ascii values of alphabet (from 65 to 90 upper case, and from 97 to 122 lower case). Then you should use charAt method and compare values of each character of string with each of two arrays. If the symbol is equal with string character, you should decide from what array you need to take value (indexes will overlap, and u should decide upper or lower case you should use)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS