The document contains Java code that counts the number of integers, uppercase characters, and lowercase characters in the string "Hello Java 8". The code converts the string to a character array, initializes counters, and uses Character methods to iterate through the array, incrementing the appropriate counter for each character type. It outputs that there is 1 integer, 2 uppercase characters, and 7 lowercase characters in the given string.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
39 views1 page
String Q5
The document contains Java code that counts the number of integers, uppercase characters, and lowercase characters in the string "Hello Java 8". The code converts the string to a character array, initializes counters, and uses Character methods to iterate through the array, incrementing the appropriate counter for each character type. It outputs that there is 1 integer, 2 uppercase characters, and 7 lowercase characters in the given string.