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 are the different types of java?
What is the string function?
Is java a prime method?
Explain when classnotfoundexception will be raised ?
State the main difference between c++ and java?
What does string [] args mean?
What are accessor methods in java?
Where we write javascript code in html page?
Can inner class final?
Give example to differentiate between call by value and call by reference.
What is a function in programming?
What is meant by interface?
What a static class can contains?
What is the difference between hashmap and hashtable in java?
What is the use of static methods?