Question: *You should use stack *All input is given by user Write a java program that reverse a Statement, by reading the words into stack until
*You should use stack
*All input is given by user
- Write a java program that reverse a Statement, by reading the words into stack until you reach full stop.
Then you should pop up the content of the stack to construct the reversed statement. Make sure to begin your statement by Capital letter and end it with full stop.
Example:
Input : John likes apples.
Output: Apples likes John.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
