public static String stateAbbr ( boolean allStates ) { String state = fetchString ( "address.state_abbr" ) ; if ( allStates == true ) { return state ; } else { while ( state . equalsIgnoreCase ( "FM" ) || state . equalsIgnoreCase ( "FL" ) || state . equalsIgnoreCase ( "GU" ) || state . equalsIgnoreCase ( "PW" ) || state . equalsIgnoreCase ( "PA" ) || state . equalsIgnoreCase ( "PR" ) || state . equalsIgnoreCase ( "AE" ) || state . equalsIgnoreCase ( "AA" ) || state . equalsIgnoreCase ( "AP" ) || state . equalsIgnoreCase ( "MP" ) || state . equalsIgnoreCase ( "VI" ) || state . equalsIgnoreCase ( "AS" ) || state . equalsIgnoreCase ( "MH" ) ) { state = stateAbbr ( true ) ; } } return state ; }
random 2 letter state