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

  1. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!