wood burning stoves 2.0*
The moose likes Java in General and the fly likes Loops in a user defined date class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Loops in a user defined date class" Watch "Loops in a user defined date class" New topic
Author

Loops in a user defined date class

Josiah smith
Greenhorn

Joined: Feb 07, 2012
Posts: 8
I am having some problems with the loops in this code that should delete different dates from an array. Can you find what I am doing wrong??

Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

Hi Josiah.

Can you tell us how the behaviour differs from what you expect?


OCUP UML fundamental and ITIL foundation
youtube channel
Josiah smith
Greenhorn

Joined: Feb 07, 2012
Posts: 8
Yes,
First If I select no to search for a date: it works fine.
If I select yes and enter a date that would be a duplicate it continues to have me enter more dates instead of deleting the date and prompting if you would like to search for a date again. I think that I have the loops set up wrong and somehow need a Do while loop. It probably is an easy one, just not popping out at me... Thanks for your help
George Black
Greenhorn

Joined: Feb 07, 2012
Posts: 3
you could Search the method ' list.contains()' in the API ,i think you will find it.
 
jQuery in Action, 2nd edition
 
subject: Loops in a user defined date class
 
Similar Threads
Date Class Problems
Remove dates from an array list using iterator
Time format problem in MIDLet
Object Control Creation – From Constructor?
Breaking out of two loops