java if one sting on array match

50

java if one sting on array match -

String[] fieldsToInclude = { "id", "name", "location" };

if ( ArrayUtils.contains( fieldsToInclude, "id" ) ) {
    // Do some stuff.
}

Comments

Submit
0 Comments