Solved

What Will Be Displayed After the Following Code Is Executed

Question 10

Multiple Choice

What will be displayed after the following code is executed?
String str = "abc456";
For (int i = 0; i < str.length() ; i++)
{
Char chr = str.charAt(i) ;
If (!Character.isLetter(chr) )
System.out.print(Character.toUpperCase(chr) ) ;
}


A) ABC
B) ABC456
C) 456
D) abc456

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions