I need some help answering these questions. Label eachpart. Thank you!
A. (2 points) Write a public void set(int i, String s) methodthat sets the element of the list at index i to the values. That is, it should overwrite the existing element at i.Be sure to handle exceptional conditions appropriately.
B. (2 points) Using a foreach loop, write apublic boolean contains(String s) method that searches the list foran occurrence of a value equivalent to s (be careful with the kindof equality you use!). Return true to indicate that a stringequivalent to s is contained in the StringArrayList, and returnfalse to indicate
PayPal Gateway not configured
PayPal Gateway not configured