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
How to perform linear search in java?
What does g mean in regex?
Explain how hashmap works?
What do you mean by composition in java?
What are access specifiers in java ?
State the difference between strings and arrays.
How many days will it take to learn java?
When does an object becomes eligible for garbage collection in java?
what is thread? What are the high-level thread states? : Java thread
Why char array is preferred over string for storing password?
What is difference between equal and == in java?
What is thread start?
What is the latest version of java?
In java, how we can disallow serialization of variables?
What does int argc char * argv [] mean?