Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. 1. We can compare the ascii value of the character. Ascii for Capital case character is from 65 to 90. 2. We can compare to see if lowerCase of the character is not equal to character itself. For example - if character is 'a' the following code new StringBuilder(char).toString().toLowerCase().equals(new StringBuilder(char) will return true and hence char is lower case if character is 'A' the following code new StringBuilder(char).toString().toLowerCase().equals(new StringBuilder(char) will return false and hence char is upper case | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() System.out.println((int)'a'); | ||||
![]() System.out.println((Integer)'a'); | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||