Write a program in Java to extract the last character from a string. Ex: String = Computer. Output: r.
Answers
Answered by
0
Answer:
Given a string str, the task is to print the last character of each word in the string.
Examples:
Input: str = “Geeks for Geeks”
Output: s r sInput: str = “computer applications”
Output: r s
Similar questions
Math,
5 months ago
Math,
5 months ago
Science,
5 months ago
Math,
10 months ago
Social Sciences,
10 months ago
Math,
1 year ago
Chemistry,
1 year ago
Psychology,
1 year ago