Is Parenthesized

Write a static method that will receive two Strings, a needle and a haystack. The method should return true if the needle is found surrounded by parentheses.

Your solution must use either .substring() or .indexOf().

Preconditions:

Examples:

Files Needed




©2003–2016 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License