java code problem
level: introduction tojava
Write a method asshown below:
protected String extractValue (int index, String jsonObject)
This method takes inthe index of the ending quotation mark of a key (before thecolon) in the jsonObject and returns the value (after thecolon) for that key as a String. Make sure to check if the inputindex is a valid index. If it is an invalid index, return null.
For example, given thejsonObject below:
{“some_other_key”: -1.4, “the_key_we_want”: “some value”}
- If index pointed to the ending quotation mark around”some_other_key”, you would return the String-1.4
- If index pointed to the ending quotation mark around”the_key_we_want”, you would
OR
PayPal Gateway not configured
ORPayPal Gateway not configured