State the data type and value of y after the following is executed:
char x='7';
y=Character.isLetter(x);
Views 12
Answer:
Data type of y is boolean and value is false. Character.isLetter() method checks if its argument is a letter or not and as 7 is a number not a letter hence it returns false.
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.