ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1720)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (43)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (195)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (145)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
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?
 Question Submitted By :: Bosh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
Using token mechanism in struts we can duplicate requests in
web applications.
 
Is This Answer Correct ?    2 Yes 2 No
Balagangadhar
 
  Re: 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
# 2
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 ?    10 Yes 2 No
Veera
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the difference(or similarity if there are some) between object and a variable? ME 4
Which is the best way to use for String concatenation in Java? HCL 7
How to transfer data from an Applet to Servlet ?   1
How to create an instance of a class if the class has private constructor?   3
how many design pattern r there? and wht design pattern u use and why ? HP 5
what is the collable collections in java? Persistent 2
if a java file without any source code is valid java file?   3
program to validate the IP address? Validity range should be 0 to 255 Huawei 1
how to write a program for chat function using core java Satyam 1
i need example for java abstraction. where we use abstraction and why we need abstraction. Oracle 2
What are the Abstract Classes provided by Java? Oracle 5
Class A extends Class B but Class A also inherit Super Class Object so it is multiple inheritence give reason in support of your answer   3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com