Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

private static int getStateInfo(String state, String[][] states) {

private static int getStateInfo(String state, String[][] states) {

for (int i = 0; i < states.length; i++) {

//Remove leading and trailing spaces and verify input to array

if (state.trim().equalsIgnoreCase(states[i][0])) {

return i;

}

}

return -1;

}

This method confuses me…

I don’t understand how the integer getStateInfo has two strings in parenthesis after,

I also don’t understand what is happening when the program says return -1.. -1 of what?

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"