Results 1 to 2 of 2
Thread: While Loop
- 01-25-2015, 03:55 AM #1
Member
- Join Date
- Jan 2015
- Posts
- 1
- Rep Power
- 0
While Loop
Hi guys, i am new here can you please help me with an assignment.
Public class Search
Ask from the user to input text, until the user inputs the "end" word to terminate the program.
Show, which was the last word that contained "LIFE"
In the end output the message that tells which word contains "LIFE"
The println should look like this: The last row that contains "LIFE" word is:
and if there is not inputted nothing except "end"
The println would look like this: None word is typed
All i know is that i should use a while loop.
Thank you
- 01-25-2015, 06:48 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
Similar Threads
-
Simple loop within a loop not working.
By supremegrandruler in forum New To JavaReplies: 3Last Post: 03-21-2014, 10:27 AM -
While Loop inside a While Loop
By steveday77 in forum New To JavaReplies: 3Last Post: 05-10-2013, 02:43 AM -
Problem with while loop, assigning a variable with a different value every loop? Help
By JavaProg in forum New To JavaReplies: 2Last Post: 11-07-2011, 03:25 AM -
Is it Possible? Array elements Initialized in Loop, can it be viewed outside loop?
By JPH in forum New To JavaReplies: 1Last Post: 10-01-2011, 03:12 AM -
JTextField loop 2x for-loop WEIRD!
By Streetproject in forum AWT / SwingReplies: 2Last Post: 02-16-2011, 06:46 PM
Bookmarks