Reputation: 55
name = ["abc","xyz"]
, which i need to declare and pass to java function which accepts array of string as first argument and string as a second argumentpublic void checkmatch(Strings names[], String city)
the feature is like below
Scenario : ....
def match = JavaType('MatchChecker')
def names = ["abc","xyz"]
when ..
then..
And match.checkmatch(names, "HYD")
Currently this is giving compile time error due to incorrect syntax.
How do I declare and pass these two parameter to checkmatch method.
Upvotes: 1
Views: 40
Reputation: 58088
Try using List<String>
instead of String[]
as the first argument type.
Upvotes: 0