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:
Verified
Q1: The StringBuilder class's insert method allows you
Q4: Which of the following statements is not
Q7: What will be displayed after the following
Q9: What will be the value of position
Q10: A series of words or other items
Q11: Which of the following are used as
Q12: Which of the following import statements is
Q21: Which of the following statements converts a
Q35: Which of the following statements converts an
Q45: What will be displayed after the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents