Results 1 to 2 of 2

Thread: While Loop

  1. #1
    ardianlumi is offline Member
    Join Date
    Jan 2015
    Posts
    1
    Rep Power
    0

    Default 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

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,716
    Rep Power
    18

Similar Threads

  1. Simple loop within a loop not working.
    By supremegrandruler in forum New To Java
    Replies: 3
    Last Post: 03-21-2014, 09:27 AM
  2. While Loop inside a While Loop
    By steveday77 in forum New To Java
    Replies: 3
    Last Post: 05-10-2013, 01:43 AM
  3. Replies: 2
    Last Post: 11-07-2011, 02:25 AM
  4. Replies: 1
    Last Post: 10-01-2011, 02:12 AM
  5. JTextField loop 2x for-loop WEIRD!
    By Streetproject in forum AWT / Swing
    Replies: 2
    Last Post: 02-16-2011, 05:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •