Computer Science, asked by chintu6637, 6 months ago

Write a statement for each to perform the following task on a string:
(i) Extract the second last character of a word stored in the variable word.
(ii) Check if the second character of a string str is in upper case.

Answers

Answered by roopeshamaltp
8

Answer:

1.Extract the second last character of a word stored in the variable wd. char ch = wd. charAt(wd. length() - 2);

2.· Im getting a parameter " fieldName" and I have to check if the second letter is uppercase. What I tried was : fieldName.

Answered by ananya31838
2

Answer:

char chr = wd.charAt(wd.length() - 1);

Explanation:

Similar questions