60 537
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #5720 in Java | JSP | JSF for Zhang Hui

Question #5720
The method must now ask for the customer name. If the customer is part of the loyalty program the
method must update the arrays according to this purchase. How to check the customer is already exist in the string array?
Expert's answer
Fot example we have:

String[] customers;

Strung customer;

but with some value;

to check if the customer exist use following:



if (Arrays.asList(customers).contains(customer))
return true;

else retunr false;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions