Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loops in a user defined date class

 
Josiah smith
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2596
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Josiah.

Can you tell us how the behaviour differs from what you expect?
 
Josiah smith
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could Search the method ' list.contains()' in the API ,i think you will find it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic