public int toInt ( int defaultValue ) { try { return Integer . parseInt ( sb . toString ( ) ) ; } catch ( java . lang . NumberFormatException e ) { e . printStackTrace ( ) ; } return defaultValue ; }
returns int value when format error occurred returns default value