I have one Shopping cart application, i that i have
selected some items, while clicking submit button by
mistake i have clicked twice or trice, that time items are
selected twice or trice. Actually i want only one copy of
items but its selected twice or trice. So how can we avoid
this problem?
Answer Posted / veera
If this question in core (jave Collection): if you are
using list,it will take the duplicate values. so pass
through this list into set it will remove the duplicate
values.
if this question in J2EE servlets: use post method, it it
is not idempotent. once you add item to cart, it will give
the acknowledge before changing in server.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is the difference between private & public & friendly classes?
What is the purpose of checked and unchecked exceptions in JAVA?
What exactly is a .class file?
How to retrieve data from database in java using arraylist?
Why main method is static in java?
How to convert string to byte array and vice versa?
How to sort array of 0 and 1 in java?
what is thread? : Java thread
What are the new features in java 8?
Explain about the performance aspects of core java?
Explain throw keyword in java?
What is the difference between menuitem and checkboxmenu item?
What is keyword in oop?
What is lazy initialization in java?
What is the locale class in java programming?